# Can I Use ESP8266 (AT Command) for TLS MQTT Connection to AWS IoT Broker with STM32?

**URL:** <https://forums.freertos.org/t/can-i-use-esp8266-at-command-for-tls-mqtt-connection-to-aws-iot-broker-with-stm32/21938>\
**Category:** Libraries\
**Tags:** aws-iot-core\
**Created:** [November 23, 2024, 12:56pm UTC](https://forums.freertos.org/t/can-i-use-esp8266-at-command-for-tls-mqtt-connection-to-aws-iot-broker-with-stm32/21938 "2024-11-23T12:56:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShreyAcharya](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/shreyacharya/32/5124_2.png) [@ShreyAcharya](https://forums.freertos.org/u/ShreyAcharya)\
**Post date:** [November 23, 2024, 12:56pm UTC](https://forums.freertos.org/t/can-i-use-esp8266-at-command-for-tls-mqtt-connection-to-aws-iot-broker-with-stm32/21938/1 "2024-11-23T12:56:41Z")

</div>

Hi all,

I’m working on a project with an STM32 microcontroller and an ESP8266 wifi modem (running AT firmware). My goal is to connect to the AWS IoT MQTT broker using a secure TLS connection.

I have a few specific questions:

1. Is it possible to establish a secure MQTT connection to AWS IoT using only the ESP8266’s AT command set?
2. If so, how can I handle the AWS IoT root CA, and private key using AT commands?
3. Are there any known limitations or issues with using the ESP8266 in this way for AWS IoT, or is it recommended to offload the TLS handling to STM32 instead?

Any guidance, examples, or references would be highly appreciated!

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ActoryOu](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/actoryou/32/2880_2.png) [@ActoryOu](https://forums.freertos.org/u/ActoryOu)\
**Post date:** [November 24, 2024, 3:10am UTC](https://forums.freertos.org/t/can-i-use-esp8266-at-command-for-tls-mqtt-connection-to-aws-iot-broker-with-stm32/21938/2 "2024-11-24T03:10:44Z")

</div>

Hi @ShreyAcharya,  
Thank you for reaching out to us. We appreciate your inquiry. IMO, your question seems to be more closely related to the ESP8266 platform. For the most accurate and efficient assistance, it might be beneficial to contact Espressif directly, as they are the experts on this particular hardware. Please let us know if there’s anything else we can help you with.

> [@ShreyAcharya](#):
>
> Are there any known limitations or issues with using the ESP8266 in this way for AWS IoT, or is it recommended to offload the TLS handling to STM32 instead?

You might be interested in this [ESP doc](https://docs.espressif.com/projects/esp-at/en/release-v2.2.0.0_esp8266/AT_Command_Set/TCP-IP_AT_Commands.html#establish-ssl-connection).

```auto
For ESP8266 devices, only one SSL connection can be established due to limited memory.

```

Thank you.
