Stream DynamoDB changes to Lambda via DynamoDB Streams for CDC

domain: docs.aws.amazon.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Enable DynamoDB Streams on your table: `aws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES`.
  2. Note the stream ARN from the response (`LatestStreamArn`).
  3. Create a Lambda function with an IAM role that has `dynamodb:GetRecords`, `dynamodb:GetShardIterator`, `dynamodb:DescribeStream`, and `dynamodb:ListStreams` permissions.
  4. Add the DynamoDB stream as an event source mapping: `aws lambda create-event-source-mapping --function-name MyFunction --event-source-arn <STREAM_ARN> --starting-position LATEST --batch-size 100`.
  5. In the Lambda handler, iterate `event.Records`, inspect `eventName` (INSERT/MODIFY/REMOVE), and process the `dynamodb.NewImage` and `dynamodb.OldImage` fields.

Known gotchas

Related routes

Set up BigQuery CDC via Datastream to replicate Postgres or MySQL changes continuously
cloud.google.com · 6 steps · unrated
Handle upstream schema changes mid-stream in a Debezium CDC pipeline without data loss
debezium.io · 6 steps · unrated
Handle schema changes mid-stream in a Debezium CDC pipeline using the schema history topic and schema change events
debezium.io · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans