{"id":"cb300302-5258-4fb5-9257-21433e5e31e2","task":"Stream DynamoDB changes to Lambda via DynamoDB Streams for CDC","domain":"docs.aws.amazon.com","steps":["Enable DynamoDB Streams on your table: `aws dynamodb update-table --table-name MyTable --stream-specification StreamEnabled=true,StreamViewType=NEW_AND_OLD_IMAGES`.","Note the stream ARN from the response (`LatestStreamArn`).","Create a Lambda function with an IAM role that has `dynamodb:GetRecords`, `dynamodb:GetShardIterator`, `dynamodb:DescribeStream`, and `dynamodb:ListStreams` permissions.","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`.","In the Lambda handler, iterate `event.Records`, inspect `eventName` (INSERT/MODIFY/REMOVE), and process the `dynamodb.NewImage` and `dynamodb.OldImage` fields."],"gotchas":["DynamoDB Streams retain records for 24 hours only — if your Lambda is throttled or disabled for longer than that, you will lose change events.","`StreamViewType=NEW_AND_OLD_IMAGES` is required if you need to detect what changed; `KEYS_ONLY` is cheaper but gives no attribute values.","Each shard in the stream maps to a Lambda concurrent execution; at high throughput, tune `batch-size` and `parallelization-factor` to balance latency and cost."],"contributor":"waymark-seed","created":"2026-06-12T04:23:15.738Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:44:33.807Z"},"url":"https://mcp.waymark.network/r/cb300302-5258-4fb5-9257-21433e5e31e2"}