# How to connect to aws cloud

**URL:** <https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307>\
**Category:** Legato Application Framework\
**Created:** [October 4, 2022, 9:36am UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307 "2022-10-04T09:36:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![babang.parhusip](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@babang.parhusip](https://forum.legato.io/u/babang.parhusip)\
**Post date:** [October 4, 2022, 9:36am UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307/1 "2022-10-04T09:36:25Z")

</div>

I did browse through legato documentation, it seems there is no straights forward approach how to connect device to cloud.

Example I want to leverage AWS Embedded SDK C

> **[GitHub - aws/aws-iot-device-sdk-embedded-C: SDK for connecting to AWS IoT from...](https://github.com/aws/aws-iot-device-sdk-embedded-C)**
>
> SDK for connecting to AWS IoT from a device using embedded C. - GitHub - aws/aws-iot-device-sdk-embedded-C: SDK for connecting to AWS IoT from a device using embedded C.

to connect to AWS IoT core using MQTT.

How can I do this?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 4, 2022, 9:59am UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307/2 "2022-10-04T09:59:52Z")

</div>

Didn’t you find openssl version problem before?

> **[How to port MQTT of AWS IoT Device SDK for Embedded C to mangOH platform](https://mangoh.discourse.group/t/how-to-port-mqtt-of-aws-iot-device-sdk-for-embedded-c-to-mangoh-platform/9926/9)**
>
> Probably you need to wait for next release r17 Or you can see here To include in .cdef file:

Have you tried http post?

> <https://stackoverflow.com/questions/52814373/http-post-to-aws-iot>

---

<div class="post-metadata">

**Author:** ![ravneet.singh.iitd](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@ravneet.singh.iitd](https://forum.legato.io/u/ravneet.singh.iitd)\
**Post date:** [June 26, 2023, 8:40am UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307/5 "2023-06-26T08:40:07Z")

</div>

Hi @babang.parhusip Were you able to connect to AWS cloud?

---

<div class="post-metadata">

**Author:** ![sarfaraz.akram](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/sarfaraz.akram/32/2378_2.png) [@sarfaraz.akram](https://forum.legato.io/u/sarfaraz.akram)\
**Post date:** [October 21, 2024, 2:36pm UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307/6 "2024-10-21T14:36:11Z")

</div>

To connect to AWS IoT Core using the AWS Embedded C SDK and MQTT, follow these steps:

1. Install AWS IoT Embedded C SDK: Download the SDK from the AWS IoT SDK for Embedded C GitHub repository and set up your environment (cross-compiler if needed for embedded systems).

2. Set up AWS IoT Core: In the AWS Console, create an IoT thing, certificate, and policy. Attach the policy to the certificate and download the certificate and keys.

3. Configure the SDK: Update your config files in the SDK to use the endpoint, certificate, private key, and root CA from your AWS IoT setup.

4. Code implementation:

5. Initialize the MQTT client from the SDK.

6. Set up your TLS context using the certificate and private key.

7. Use the MQTT API to connect to AWS IoT Core with the client and publish/subscribe to topics.

8. Test: Once set up, you can test the connection and ensure the device is able to send and receive MQTT messages.

I did something similar in my project, and the SDK documentation helped a lot to guide me through setup and testing.

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)\
**Post date:** [October 21, 2024, 2:44pm UTC](https://forum.legato.io/t/how-to-connect-to-aws-cloud/6307/7 "2024-10-21T14:44:04Z")

</div>

Here is an example on how to compile azure sdk:

> [@Example on compiling Azure-IoT-SDK-for-Embedded-C with the toolchain of WP76 module](https://forum.legato.io/t/example-on-compiling-azure-iot-sdk-for-embedded-c-with-the-toolchain-of-wp76-module/6541):
>
> The Azure SDK for Embedded C is designed to allow small embedded (IoT) devices to communicate with Azure services. Here is an example on compiling Azure-IoT-SDK-for-Embedded-C with the toolchain of WP76 module: [Example on compiling Azure-IoT-SDK-for-Embedded-C with the toolchain of WP76 module.docx](https://forum.legato.io/uploads/short-url/AcdGW43j1RFWTJbzVXj5OuVa394.docx) (355.2 KB)
