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:

Summary

AI-assisted

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.

Close
?
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

AI-assisted

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.

Close
?
Which runtime and file should I use for the Lambda function?
Select Node.js 20.x as the runtime. Add the code in the Code source editor under index.mjs, which indicates an ECMAScript module.
What needs to be in DynamoDB before I run a test?
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.
How do I change the DynamoDB table, attribute, or AWS Region the function uses?
Edit TABLE_NAME, ATTRIBUTE_NAME, and the Region configured in DynamoDBClient within index.mjs. Save and redeploy the function before testing again.
Where do I paste the Lambda function code?
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.
What result should I expect after running a test event?
The Lambda console shows the execution status and a return value that includes the average temperature computed from the scanned items.
Next