Designing MQTT Topics for AWS IoT Core - Designing MQTT Topics for AWS IoT Core

Designing MQTT Topics for AWS IoT Core

Publication date: May 2019 (Document History)


This whitepaper focuses on best practices for designing MQTT topics in Amazon Web Services (AWS) Internet of Things (IoT). It covers how developing an optimal MQTT topic schema can improve the overall architecture of your IoT applications by providing greater visibility into cloud to device communication, providing more fine-grained security permissions, and enhancing integration options with other AWS IoT Core services, such as the AWS IoT Rules Engine, AWS IoT Device Shadow, AWS IoT Device Management, and AWS IoT Analytics. This whitepaper is intended for technical architects, IoT cloud engineers, and embedded engineers. This paper assumes that the reader understands fundamental MQTT concepts and terminology.


AWS IoT Core supports MQTT, a widely adopted lightweight messaging protocol designed for constrained devices. MQTT participants receive information organized through MQTT topics. An MQTT topic acts as a matching mechanism between publishers and subscribers. Conceptually, an MQTT topic behaves like an ephemeral notification channel.

For AWS IoT, one of the first considerations when using MQTT is the design strategy of your MQTT topics. MQTT topics must balance current device communications, cloud side operations, and future device capabilities. Therefore, it can be challenging to design an ideal MQTT topic structure that creates enough of a schema to enforce least privilege communication but does not create a rigid structure that makes it challenging to support future device deployments.

This document provides you with MQTT topic design best practices and guidance. It outlines a set of commonly used MQTT topic structures that can be implemented to solve various device message patterns, then applies several example design patterns using different AWS IoT services.