Explanation
Why the waste happens and who it affects.
If the error is persistent and unhandled, retries can accumulate rapidly - often invisibly - creating a large volume of billable executions with no successful outcome. This is especially costly when functions run for extended durations or have high memory allocation.
Billing model
The pricing dimensions that drive this cost.
- Each retry counts as a separate request
- Billed per millisecond of execution time for each retry
- Retries from failed invocations can exponentially increase cost if not controlled
How to detect
5 checks to find it in your estate.
- Check for high error-to-success ratios in CloudWatch Metrics
- Investigate spikes in invocation count after initial failure events
- Correlate retries with common payloads and error messages
- Review configurations for MaximumRetryAttempts and DLQs
- Assess the presence of throttling, downstream timeouts, or missing exception handling
How to fix
6 ways to remove the waste.
- Configure DLQs to isolate and inspect failed invocations
- Implement exponential backoff or circuit breaker patterns in retry logic
- Set appropriate retry limits for each source: MaximumRetryAttempts and MaximumRecordAgeInSeconds on stream event source mappings (Kinesis, DynamoDB Streams), MaximumRetryAttempts (0-2) and maximum event age on asynchronous invocation settings, and a redrive policy with maxReceiveCount and a dead-letter queue on SQS source queues
- Improve exception handling and idempotency in function code
- Utilize anomaly detection software to alert on abnormal retry patterns
- Monitor CloudWatch for retry-specific metrics and alarms
Documentation
Vendor references for pricing and configuration.
- Understanding retry behavior in Lambda - AWS Lambdadocs.aws.amazon.com
- Capturing records of Lambda asynchronous invocations - AWS Lambdadocs.aws.amazon.com
- How Lambda processes records from stream and queue-based event sources - AWS Lambdadocs.aws.amazon.com
- Handling errors for an SQS event source in Lambda - AWS Lambdadocs.aws.amazon.com
- AWS Lambda Pricingaws.amazon.com