AWS IoT is an easy way to transmit IoT sensor data to the Cloud (AWS) using the lightweight MQTT protocol. However AWS IoT supports only the secure MQTTS version of MQTT. It requires a set of security certificates to be stored on each sensor/device and support for SSL/TLS on the sensor. Also all the devices need to be connected to the Internet. Instead of managing certificates on all the different sensors and providing them with secure Internet access, sometimes it is preferable and practical to have an intermediate gateway that the sensors communicate with on MQTT, and have the gateway in turn communicate with AWS IoT on MQTTS.
The gateway acts as an MQTT proxy, and if using cellular connections, a proxy could potentially save hundreds to thousands of dollars per month (depending on the number of connections and volume of data) by avoiding the overhead of SSL/TLS on individual sensor links.
The script to achieve proxying is rather straightforward and there are only a couple of configuration issues to take care of to enable the MQTT proxy.