connecting-lambda-to-dynamodb

Connects AWS Lambda functions to DynamoDB tables with IAM roles, streams, and event source mappings.

Updated Jul 1, 2026
One-click install
npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill connecting-lambda-to-dynamodb-sakicodes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: connecting-lambda-to-dynamodb
Source: https://github.com/sakicodes/BuildFestHackathon26/tree/main/.agents/skills/connecting-lambda-to-dynamodb
Command: npx skills add https://github.com/sakicodes/BuildFestHackathon26 --skill connecting-lambda-to-dynamodb-sakicodes

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Setting up Lambda-DynamoDB integration requires coordinating IAM roles, function deployment, stream configuration, and event source mappings across multiple AWS services, which is error-prone when done manually. ## Core Features & Use Cases - End-to-End Provisioning: Creates the IAM execution role, Lambda function, DynamoDB table with streams, and event source mapping in a guided sequence. - Safety Guardrails: Requires upfront parameter collection, explicit user confirmation before creating resources, and graceful handling of existing resources. - Testing & Verification: Includes test event invocation, CloudWatch log checks, and troubleshooting guidance for common failures. - Use Case: A developer building an event-driven backend can use this Skill to deploy a Lambda function that automatically processes every insert, update, and delete on a DynamoDB table. ## Quick Start Connect my Lambda function to a DynamoDB table with streams enabled and set up the event source mapping.

Frequently Asked Questions about connecting-lambda-to-dynamodb

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Lambda function to a DynamoDB table?

Create an IAM execution role with the AWSLambdaDynamoDBExecutionRole policy, deploy the Lambda function, create a DynamoDB table with streams enabled using NEW_AND_OLD_IMAGES, then create an event source mapping between the stream and the function.

How to set up DynamoDB streams to trigger Lambda?

Enable DynamoDB streams on the table with the NEW_AND_OLD_IMAGES view type, capture the stream ARN, and create an event source mapping with batch size 100 and starting position LATEST pointing to your Lambda function.

Why is my Lambda function not triggering from DynamoDB events?

Verify the event source mapping is active with aws lambda list-event-source-mappings, confirm the DynamoDB stream is enabled with the correct view type, and check the execution role has proper permissions.

What IAM permissions does Lambda need for DynamoDB streams?

Attach the AWSLambdaDynamoDBExecutionRole managed policy to the execution role and ensure the trust policy allows the Lambda service to assume it. This grants stream reading and CloudWatch logging permissions.

Can I customize the DynamoDB table partition key and Lambda runtime?

Yes, the procedure accepts parameters for partition key name and type (S, N, or B), Lambda runtime (default python3.12), AWS region, and role name. Required parameters are function name and table name.