In a Java-based AWS Lambda service, you discover that an API sometimes returns 500 errors only during traffic spikes. You want to improve resilience without changing API contracts. Which combination of changes best addresses transient backend failures while preserving ordering constraints per client?
Answer
Add retries with exponential backoff on only 429 and 5xx, enable DLQ for failed async events, and keep requests idempotent via client-provided idempotency keys stored in DynamoDB with conditional writes
Explanation
Exponential backoff retries for transient 429/5xx plus idempotency prevents duplicate processing under retries. DLQ captures poison-pill events for later analysis without breaking the API contract.
Last reviewed: October 2026
Reviewed by FirstInTest Editorial Team
Related questions
A microservice receives HTTP requests through an ALB to ECS tasks. The service must support blue/green deployments while keeping sessions consistent. Which combination is most suitable for minimizing disruption and maintaining user experience?
View question →
In a Lambda function integrated with DynamoDB, you currently use UpdateItem with an unconditional update expression. Under concurrent updates to the same item, you frequently lose increments. You need to preserve correctness without serializing requests at the application layer. What is the best fix?
View question →
You are designing a REST API with API Gateway + Lambda + DynamoDB. For a write path, multiple items share a partition key, and clients expect “exactly-once effect” semantics even when network timeouts occur. Which approach is most appropriate?
View question →
You are building an event-driven system with EventBridge rules that route domain events to different Lambda targets. Some events must be delivered to multiple services, while others must not be duplicated across replays. Which configuration strategy best satisfies both requirements?
View question →
A Node.js Lambda function processes SQS messages. You need to ensure that when a message fails processing, it is retried with increasing delay, but also that it doesn’t loop forever on unrecoverable errors. Which option best matches this requirement?
View question →
A team wants to implement secure access to an AWS App Runner service via JWT-based authorization from a custom domain. They need to validate tokens and pass identity to the backend without embedding secrets in the container. Which approach is best?
View question →