aws / aws-iot-device-sdk-embedded-C

SDK for connecting to AWS IoT from a device using embedded C.
MIT License
978 stars 625 forks source link

Does "aws-iot-device-sdk-embedded-C" support MQTT with Amazon Cognito authetication #1721

Closed owenwang2008 closed 2 years ago

owenwang2008 commented 3 years ago

Hello! I just want to know if "aws-iot-device-sdk-embedded-C" support MQTT with Amazon Cognito authetication? We need to implement MQTT communication to the Amazon cloud with Amazon Cognito authetication to the identity pool on Linux. From the amazon website it seems to me that Amazon Cognito mobile SDK is only available for Android/iOS/Javascript, but not for C/C++ on Linux. Then I found this repo with MQTT support to the Amazon IoT cloud, but it seems no Amazon Cognito is supported. So I just want to double check if it's the case, and if it's not supported, do you know any C/C++ SDK to support MQTT+Amazon Cognito to the Amazon cloud? thanks a lot!

dachalco commented 2 years ago

@owenwang2008

Looking into this, will get back to you soon.

dachalco commented 2 years ago

Hi @owenwang2008

No, aws-iot-device-sdk-embedded-C does not natively support authentication via Cognito.

However it should be possible via other means. According to this documentation you can use the aws-c-auth to interface Cognito. It's a git repo so you poke around the docs or create issues as needed. Once you have that library working you could tie it into your choice c/c++ MQTT SDK, such as this one, to handoff the credentials before connecting.

As you go through this process, if you have any more questions specific to this repo, please re-open the issue.