Understanding the approach to connect the ESP32 to AWS IoT Core
The IoT device access service provided by the AWS cloud is AWS IoT Core, as discussed in Chapter 5 in the AWS for IoT section. As highlighted in that section, as of December 2023, the following four communication protocols are supported:
- MQTT
- MQTT over WebSockets Secure (WSS)
- Hypertext Transfer Protocol – Secure (HTTPS)
- LoRaWAN
Among these protocols, MQTT stands out as one of the most widely used. It accommodates the clients by enabling the publishing and subscribing of messages. The mechanisms of MQTT are explained in the Chapter 5 section Communication protocols between IoT devices and the cloud.
Before establishing MQTT communication between an IoT device and AWS IoT Core, a secured low-layer connection must be created using TLS. TLS is a cryptographic protocol designed to provide secure communication over a network, supporting both server and client authentication.
Implementing...