PluginBench
Skill
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.

Related skills

More from aws/agent-toolkit-for-aws and the wider catalog.

COconnecting-to-data-source logo

connecting-to-data-source

aws/agent-toolkit-for-aws

Create and test AWS Glue connections to JDBC databases, Redshift, Snowflake, and BigQuery.

1.6k installsAudited
COconnecting-vpcs-with-peering logo

connecting-vpcs-with-peering

aws/agent-toolkit-for-aws

Establishes VPC peering connections between two VPCs for direct private network connectivity. Always use this skill when creating or managing VPC peering — it validates CIDR overlap, updates all route tables in both VPCs, configures DNS resolution, and provides security group guidance that are critical for correct connectivity.

1.2k installsAudited
CRcreating-amazon-aurora-db-cluster-with-instances logo

creating-amazon-aurora-db-cluster-with-instances

aws/agent-toolkit-for-aws

Creates a complete Amazon Aurora database cluster with instances, handling cluster creation, instance provisioning, and Secrets Manager password management in the proper sequence. Use when setting up new Aurora MySQL or PostgreSQL clusters with production-ready configuration.

1.2k installsAudited
CRcreating-api-gateway-stage logo

creating-api-gateway-stage

aws/agent-toolkit-for-aws

Create fully configured API Gateway stages with logging, tracing, throttling, and security controls.

1.3k installsAudited
CRcreating-data-lake-table logo

creating-data-lake-table

aws/agent-toolkit-for-aws

Create managed Iceberg tables on Amazon S3 with automatic compaction and snapshot management.

1.5k installsAudited
CRcreating-ec2-image-builder-pipeline logo

creating-ec2-image-builder-pipeline

aws/agent-toolkit-for-aws

Creates a complete EC2 Image Builder pipeline that builds a custom AMI with pre-installed software, distributes it to target regions, executes the pipeline, and creates a launch template. Use when setting up automated AMI creation with IAM roles, build components, image recipes, and infrastructure configuration.

1.2k installs