Integrate AWS Lambda with DynamoDB for IoT applications running Windows on Arm
Introduction
Background
Create the AWS Lambda Function
Implement the AWS Lambda Function
Test Lambda Function
Next Steps
Integrate AWS Lambda with DynamoDB for IoT applications running Windows on Arm
Who is this for?
This is an advanced topic for developers who are interested in using AWS Lambda for processing data stored in DynamoDB.
What will you learn?
Upon completion of this Learning Path, you will be able to:
- Implement an AWS Lambda function that processes data stored in a DynamoDB table.
- Learn how to work with DynamoDB to scan and aggregate records.
Prerequisites
Before starting, you will need the following:
- A Windows on Arm computer such as the Lenovo Thinkpad X13s running Windows 11 or a Windows on Arm virtual machine .
- Any code editor. Visual Studio Code for Arm64 is suitable.
- Completion of the Create IoT applications with Windows on Arm and AWS IoT Core Learning Path.
Summary
This summary was drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
You’ll create a Node.js 20.x AWS Lambda function that scans a DynamoDB table and computes an average temperature. You’ll add the code to
index.mjs, configure the table, attribute, and Region, generate data with the IoT emulator, deploy the function, and test its return value in the Lambda console.Frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Select Node.js 20.x as the runtime. Add the code in the Code source editor under
index.mjs, which indicates an ECMAScript module.Ensure the table contains records written by the IoT emulator referenced in the prerequisite Learning Path Create IoT applications with Windows on Arm and AWS IoT Core](/learning-paths/laptops-and-desktops/win_aws_iot/). The example code expects a table named
SensorReadings with a numeric temperature attribute.Edit
TABLE_NAME, ATTRIBUTE_NAME, and the Region configured in DynamoDBClient within index.mjs. Save and redeploy the function before testing again.Scroll to the Code source section of the function and paste the code into
index.mjs. The .mjs extension designates the file as an ES module.The Lambda console shows the execution status and a return value that includes the average temperature computed from the scanned items.