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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠