aws IOT core rule with dynamodb

0

Hello, I'm new to use aws iot rule action with dynamodb. What I understand is that when iot rule initiated 1000 time simultaneously, then dynamodb 1000 putitem happen in once. Is it right?

If so, when I want to relieve dynamodb throughput, do I have to add kinesis or sqs in here, too? or any other way exists?

asked a year ago291 views
2 Answers
0
Accepted Answer

Using Kinesis or SQS :

If you want to relieve the DynamoDB throughput, you could consider using Kinesis or SQS to buffer the messages before they are written to DynamoDB. This would allow you to control the rate at which messages are written to DynamoDB, and could help prevent any throttling issues that might occur if too many PutItem operations are attempted simultaneously.

Here's an example architecture that uses Kinesis to buffer IoT messages before writing them to DynamoDB:

  • Set up an IoT rule to send messages to a Kinesis stream.
  • Use a Kinesis Lambda trigger to read messages from the stream and write them to DynamoDB.
  • Set up a Kinesis client to consume the messages from the stream. By using Kinesis, you can also implement additional processing on the incoming messages, such as aggregating data, filtering or transforming messages before writing them to DynamoDB.
AWS
answered a year ago
-1

No, when an IoT rule is triggered, it will send a separate PutItem request to DynamoDB for each message. So if 1000 messages are sent simultaneously, then 1000 PutItem requests will be sent to DynamoDB.

To relieve DynamoDB throughput, you can consider using DynamoDB Streams and AWS Lambda. You can configure DynamoDB Streams to capture changes to the DynamoDB table, and then use AWS Lambda to process the changes and perform batch writes to DynamoDB. This can help reduce the number of write requests to DynamoDB and improve the overall throughput.

Using Kinesis or SQS can also help in reducing the DynamoDB write requests, but it depends on your specific use case and requirements.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions