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 個回答
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
專家
已回答 2 個月前
  • 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.

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南