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.
Known 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.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp