Search code examples
aws-iotamazon-mq

Using Amazon MQ or AWS IoT for self managed IoT Devices


I've tried Amazon MQ today and found out that it is very easy to setup and we can integrate the pub/sub feature on our IoT device side quickly. But unfortunately, when I check the limitations of Amazon MQ, the maximum connection for an instance is only 1000.

The ff screenshot taken from Amazon MQ Docs:

enter image description here

This is too low. And I don't see a quota increase options for that. Plus, I am only allowed to have a maximum of 20 brokers per region, so basically a max of 20k devices only. And to create 20 brokers, the cost is too high as compared to setting up an MQTT broker by myself in an EC2 instance of 8Gb memory and 2CPUs, I can handle up to 50k connections.

Then I saw another option which is to use the AWS IoT for device management. It supports up to 500k devices. But the downside is I have to register all my devices as "Thing", and I have to get certificate for each device. But I really don't need Amazon to manage my devices and keep track of the device's states, we already have it done. Plus, we have to familiarize our self on how devices are managed using the AWS IoT device management console. Therefore, using the AWS IoT service as a message broker is more time consuming to implement than using Amazon MQ.

So, my question is, is Amazon MQ really not designed for IoT devices? Is there anyway to use just the MQTT broker service alone of AWS IoT device management without using its management features(I don't think this is possible)?


Solution

  • Amazon MQ is a cloud managed service for Apache ActiveMQ. One of its aims is to make it easy to migrate an existing product using the protocols that ActiveMQ supports to a cloud managed solution.

    So, my question is, is Amazon MQ really not designed for IoT devices?

    Your question presumes that there is a black and white answer. Amazon MQ may be entirely suitable for an existing product that needs a managed cloud broker. For another product with different requirements it may not be suitable.

    Is there anyway to use just the MQTT broker service alone of AWS IoT device management without using its management features(I don't think this is possible)?

    Yes, it is possible to use the AWS IoT broker without using the 'thing' management features. From https://docs.aws.amazon.com/iot/latest/developerguide/iot-thing-management.html

    You do not need to create a thing in the registry to connect a device to AWS IoT.

    You can connect a client device to the AWS IoT MQTT broker using just a certificate without creating a thing. Though typically each device has its own certificate and the thing registry is a means to manage the relationship between a device and a certificate.

    There are also alternate means for clients to authenticate.