PluginBench
Skill
Official
Pass
Audit score 90

connecting-lambda-to-dynamodb

aws/agent-toolkit-for-aws

Connect AWS Lambda to DynamoDB with IAM roles, streams, and event source mapping.

What is connecting-lambda-to-dynamodb?

Sets up end-to-end Lambda-DynamoDB integration including IAM execution role creation, DynamoDB stream configuration, and event source mapping. Use when building serverless event-driven architectures that process DynamoDB stream events.

  • Creates IAM execution roles with proper trust policies for Lambda
  • Configures DynamoDB streams with appropriate view types
  • Sets up event source mapping between Lambda and DynamoDB streams
  • Manages read/write permissions for Lambda-DynamoDB access
  • Deploys Lambda functions integrated with DynamoDB tables
  • Handles stream event triggering and batch processing configuration

How to install connecting-lambda-to-dynamodb

npx skills add https://github.com/aws/agent-toolkit-for-aws --skill connecting-lambda-to-dynamodb
Prerequisites
  • AWS account with appropriate permissions
  • Existing or planned DynamoDB table
  • Lambda function code ready for deployment
Claude Code
Cursor
Windsurf
Cline

How to use connecting-lambda-to-dynamodb

  1. 1.Create or identify the DynamoDB table to connect
  2. 2.Set up an IAM execution role with AWSLambdaDynamoDBExecutionRole policy
  3. 3.Enable DynamoDB streams on the table with desired view type
  4. 4.Deploy your Lambda function with the execution role attached
  5. 5.Create an event source mapping linking the DynamoDB stream to Lambda
  6. 6.Test the integration by triggering DynamoDB changes and verifying Lambda execution

Use cases

Good for
  • Processing real-time changes from DynamoDB tables with Lambda functions
  • Building event-driven serverless architectures on AWS
  • Automating workflows triggered by DynamoDB insert, update, or delete operations
  • Replicating or transforming DynamoDB data in response to stream events
  • Setting up Lambda-based audit logging for DynamoDB table changes
Who it's for
  • AWS developers building serverless applications
  • DevOps engineers deploying event-driven architectures
  • Backend engineers integrating Lambda with DynamoDB
  • Teams implementing real-time data processing pipelines

connecting-lambda-to-dynamodb FAQ

What IAM permissions does Lambda need for DynamoDB?

The execution role must have the AWSLambdaDynamoDBExecutionRole policy attached, which grants permissions for reading DynamoDB streams and managing event source mappings.

Why isn't my Lambda function triggering from DynamoDB?

Verify the event source mapping is active, DynamoDB streams are enabled with the correct view type, and the execution role has proper permissions.

How do I fix permission denied errors?

Check that the IAM role has AWSLambdaDynamoDBExecutionRole attached and the trust policy allows Lambda service to assume the role.

What should I do if my Lambda function times out?

Increase the timeout setting in Lambda configuration or adjust the batch size in the event source mapping to process fewer records per invocation.

Full instructions (SKILL.md)

Source of truth, from aws/agent-toolkit-for-aws.


name: connecting-lambda-to-dynamodb description: Connects an AWS Lambda function to DynamoDB with IAM roles, stream event source mapping, and read/write permissions. Use when setting up Lambda-DynamoDB integration, processing DynamoDB stream events, or deploying serverless event-driven architectures. version: 1

Connecting Lambda to DynamoDB

Overview

Domain expertise for connecting AWS Lambda functions to DynamoDB tables, including IAM execution role creation, function deployment, DynamoDB stream configuration, and event source mapping setup.

Connect a Lambda function to DynamoDB

To set up end-to-end Lambda-DynamoDB integration with IAM roles, streams, and event source mapping, follow the procedure exactly. See Lambda-DynamoDB connection procedure.

Troubleshooting

Lambda function not triggering

Verify the event source mapping is active, DynamoDB streams are enabled with the correct view type, and the execution role has proper permissions. See the full procedure for details.

Permission denied errors

Check the IAM role has AWSLambdaDynamoDBExecutionRole attached and the trust policy allows Lambda to assume it.

Function timeout issues

Increase the timeout setting or adjust the batch size in the event source mapping.