Pass certificates to AWS MQTT API from in-memory location instead of on-disk

  amazon-web-services, aws-iot, python-3.x

I’m setting up an AWS IoT MQTT connection from a Python environment using Python package awsiotsdk. I have followed this example and gotten the demo publish/subscribe to work, so I have all the pieces.

The only difference from the demo is that in my environment the certificates all reside in memory rather than on disk. A hack solution would be to write them to a temp location on disk and follow the example.

I would prefer to simply instantiate the appropriate AWS authentication class which can accept a file-like object rather than a string filename. However following the code only leads me to c-binding dead ends.

How can I create an MQTT client using in-memory certificates?

Source: Python-3x Questions