dynobase-icon
Dynobase

Error: DynamoDB stream lambda error

Rafal Wilinski

Answered by Rafal Wilinski

Last updated: October 23rd, 2026

Solution

A DynamoDB stream Lambda failure can occur before invocation, while the event source mapping reads records, or inside the handler. Check the mapping’s State and LastProcessingResult first, then inspect function errors and logs. Each failure stage has a different fix.

  • Verify the mapping targets DescribeTable.LatestStreamArn and is enabled. Confirm the execution role can read that stream.
  • Check the handler’s expected images against StreamViewType and eventName. REMOVE has no NewImage and INSERT has no OldImage.
  • Monitor IteratorAge, Lambda errors, throttles, and duration. A failing batch can block later records in that shard. Fix the slow dependency or poison record before simply extending timeouts.
  • Enable ReportBatchItemFailures and return failed sequence numbers. Returning an HTTP-style statusCode: 500 from a stream handler does not itself signal an invocation failure.
// For an event source mapping with ReportBatchItemFailures enabled:
return {
  batchItemFailures: [{ itemIdentifier: failedRecord.dynamodb.SequenceNumber }]
};

Set a deliberate retry and record-age policy, consider batch bisecting, and configure an on-failure destination. Make processing idempotent because records can be delivered more than once. Test with real stream-shaped events rather than plain item JSON.

See Lambda trigger setup and AWS documentation.

Dynobase is a Professional GUI Client for DynamoDB

Start your 7-day free trial today

Product Features

Download
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2026 Dynobase
+
Still using AWS DynamoDB Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.