AWS IOT Core appropriate way to instantiate credentials

47 Views Asked by At

I am new to AWS IOT service and I need help clarifying a few things. I would like to use IOT core as a message broker to notify ECS sidecar tasks of some change happening(exactly what change is not important in the context of this question). So each sidecar task would subscribe to a certain topic and invoke some action when it receives it. So, as I am using ECS sidecar tasks(application written using Python and can be hundreds of them), what is the appropriate way to instantiate credentials? Should I be using X.509 certificate or IAM credentials? And if the answer is IAM credentials, can I use IAM role attached to task, or do I have to get temporary security credentials? Also, these tasks are long living, meaning I have to handle resubscribing with new credentials?

1

There are 1 best solutions below

0
lobis On

I would not suggest using AWS IoT for something like this, you should probably use something like AWS SNS.

Having said that you can authenticate to the mqtt broker via X.509 certificates using python (with paho library for instance). As far as I am aware certificates are the only way to auth to the broker, this being one of the reasons SNS would be preferable.