How do you save an event in AWS IoT Events to DynamoDB?

0

Hi there!

I'm able to receive a notification via email through SNS in the state transition event, but not able to add the entry to a DynamoDB table. I have set an additional action to insert this event to a table. However, I do not see the event added to the table.

Could anyone help me with how to configure the action to add the event into DynamoDB?

1 Answer
1

To save an IoT Events state transition event to DynamoDB, you need to configure an action on the rule that detects the state transition.

  • When you create the rule, under "Set one or more actions", select "Add action". Then choose the "DynamoDBv2" action and configure it to write to an existing DynamoDB table.
  • The action will write the payload of the IoT Events message to the DynamoDB table. Make sure the IAM role used by IoT Events has the necessary permissions to write to DynamoDB.
  • You can also use other AWS services like Lambda as an intermediate step to process the payload before writing to DynamoDB. For example:
1. IoT Events detects state transition and invokes Lambda function
2. Lambda function processes payload 
3. Lambda writes processed data to DynamoDB
profile picture
EXPERT
answered 2 months ago
  • Hi Giovanni, thanks for the response. It helps me a lot. I was able to configure an action for "DynamoDB" but not "DynamoDBv2". It inserted a record in the table after the event was detected. Could you please help me on how to configure the "DynamoDBv2" action? I entered the name of the table inside single quotes. There is nothing else to configure. It did not insert a record into the table.

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