2

I have an external service that sends me data via MQTT. I need to receive this data on AWS then process it and then write it to an RDS instance. What services are recommended for this purpose? An Amazon MQ and a Lambda? A SQS and a Lambda? Any other?

Thanks for any help.

Antonio José
  • 473
  • 2
  • 5
  • 14

1 Answers1

0

AWS IoT 'things' have a Message Broker that supports MQTT.

AWS IoT

Traditionally, IoT and MQTT involves huge numbers of messages, which are normally stored in DynamoDB. However, you could write an AWS Lambda function to store the received messages in an Amazon RDS database.

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
  • There will be thousands of messages per second. To avoid the risk of loss, it seems correct to direct these messages to an SQS. Am I right? – Antonio José Jun 01 '20 at 11:25
  • 1
    Storing the messages in SQS is reliable, but you'd still need to find something that can process that huge volume of messages, which is hard. At thousands of messages per second, I would advise against individually writing each message to a relational database. Depending upon how quickly you need the data to be accessible, you could either write it to Amazon S3 and load it later in a batch, or [Write to Kinesis Data Firehose Using AWS IoT](https://docs.aws.amazon.com/firehose/latest/dev/writing-with-iot.html), which can then store the data in Amazon S3 or Amazon Redshift. – John Rotenstein Jun 02 '20 at 04:14
  • Yes, you are right in your analysis. Maybe the way forward is to include it on a non-relational database and then work on the information as appropriate. S3 is also an option. Thanks. – Antonio José Jun 02 '20 at 13:57