We will continue to develop IoT projects using AWS IoT Button. We will use the Lambda rule and trigger to perform a certain action. For the demo, we save a message from AWS IoT Button into the AWS database, DynamoDB.
You can see this scenario in the following figure. Each button clicked from AWS IoT Button will be filtered and then call AWS Lambda. Inside AWS Lambda, the program will store a message into the database, AWS DynamoDB:
Firstly, we create a table on AWS DynamoDB. You can open a browser and navigate to https://console.aws.amazon.com/dynamodb. Then, you can create a new table. For instance, we set the table name as aws-iot-button-db
. We also set the primary key as msg-id
with the String
data type. You can see the AWS DynamoDB table configuration in the following screenshot:
With this we have successfully created AWS DynamoDB on Amazon AWS. Next, we will connect it with AWS Lambda.