In this lab, we will create a Lambda function to process DynamoDB stream data from an existing table that is actively being written to. Once processed, the data from the stream will be aggregated and written to a second DynamoDB table.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Create Lambda Function to Process Stream Events
- Log in to the AWS Management Console for the lab environment using the credentials provided.
- Navigate to Lambda.
- Create a new Lambda function and write/paste the code (found on GitHub) to process DynamoDB Streams events.
- Create DynamoDB Streams Trigger
- Create a new trigger for your function, setting DynamoDB as the trigger type, and provide the appropriate configuration information.
- Enable trigger on creation to start processing stream events into stats aggregation table.
- Verify Stream Processing
Navigate to DynamoDB to verify statistics are correctly aggregated and written to the stats table.