Skip to main content

How do retries, dead-letter queues, and failure destinations work?

Design finite retry policies, classify failures, isolate poison work, understand invocation-specific behavior, and build a safe redrive process.

How do retries, dead-letter queues, and failure destinations work?

Retries repeat work after a failure that may be temporary. A dead-letter queue or failure destination isolates work that exceeded a configured recovery policy, preserving evidence for investigation or replay. Their behavior depends on whether the function was invoked synchronously, asynchronously, or through a poll-based event source.

How this topic fits

Reliability

Plan for duplicate delivery, partial failure, retries, dead letters, quotas, backpressure, recovery, and regional dependencies.

Begin with the invocation model

For synchronous calls, the caller receives the response and normally owns retry policy. For asynchronous Lambda invocation, Lambda queues the event and applies configured retry and age behavior. For queues and streams, the event source and mapping control visibility, checkpoints, batches, and redelivery.

Do not apply one generic retry rule to every path. Record which component owns the attempt count, backoff, timeout, maximum age, and terminal destination.

Retry only failures that can plausibly recover

Timeouts, throttling, temporary dependency unavailability, and capacity pressure may recover after delay. Invalid input, failed authorization, unsupported schema, and permanent business rejection usually require correction rather than immediate repetition.

Use bounded exponential backoff with jitter where you control the client. Align total retry duration with the business deadline and reserve enough capacity for recovery traffic after the dependency returns.

Isolate poison work without losing context

A DLQ or failure destination should preserve the original event reference, failure reason, attempts, timestamps, source, function version, and correlation identifiers without leaking secrets. Configure alarms before the first message arrives.

Isolation protects healthy traffic from a permanently failing item. It does not decide whether to discard, repair, compensate, or replay that item, so ownership and retention must be explicit.

Build a controlled redrive process

Investigate whether failure came from code, configuration, permission, dependency, or data. Correct the cause, validate a sample, and replay at a rate the recovered system can absorb.

Redrive must preserve idempotency and ordering rules. Record who initiated it, which items were selected, the deployed version, outcomes, and any items still requiring manual resolution.

Go deeper with AWS

Read the primary AWS documentation behind the service definitions and architecture guidance in this guide.

Explore serverless products

Questions about this topic

Browse all serverless concepts

Explore compute, APIs, events, workflows, data, security, reliability, operations, delivery, and AI from one connected AWS serverless learning path.

What is serverless?

Learn what serverless computing means, how it works on AWS, what the cloud provider manages, and which trade-offs still belong to your team.

Read the guide

What is AWS Lambda?

Understand how AWS Lambda runs code, how functions are invoked, where permissions and state live, and when Lambda is a good compute choice.

Read the guide

What is serverless architecture?

Learn how managed compute, APIs, events, queues, workflows, data, identity, and observability fit together in a serverless architecture on AWS.

Read the guide

AWS serverless security

A practical guide to identity, least privilege, event validation, secrets, data protection, dependencies, and incident visibility in AWS serverless systems.

Read the guide

What is agentic AI?

Learn what makes an AI system agentic, how models, tools, memory, orchestration, identity, and evaluation fit together, and where serverless patterns help on AWS.

Read the guide

What is cloud computing?

Understand how on-demand infrastructure and managed services change the way teams provision, scale, pay for, and operate software systems.

Read the guide

What is event-driven architecture?

Learn how producers, routers, and consumers communicate through events, and how to design schemas, delivery, retries, and ownership deliberately.

Read the guide

What is a serverless API?

Understand the request path, authentication, routing, compute, data, throttling, observability, and failure controls behind a serverless API on AWS.

Read the guide

What are serverless workflows?

Learn when explicit workflow state improves retries, branching, parallel work, human approval, visibility, and recovery in distributed applications.

Read the guide

What is Amazon API Gateway?

Learn how API Gateway creates, publishes, secures, monitors, and operates HTTP, REST, and WebSocket APIs for AWS and external backends.

Read the guide

What is Amazon EventBridge?

Understand EventBridge event buses, rules, pipes, schemas, targets, schedules, permissions, delivery, and recovery in event-driven AWS systems.

Read the guide

Make the next serverless decision explicit.

Explore focused products for repeatable work, or bring the architecture decision that needs context and experienced review.