Lambda reading SQS processes the same failed batch repeatedly. How to fix partial failures?
IntermediateScenarioRoute 53, CloudFront and Messaging
Answer
Situation read → Without partial batch response, one bad record retries the whole batch.
What I'd do →
- Enable
ReportBatchItemFailureson the event source mapping - Return
{"batchItemFailures":[{"itemIdentifier":"<messageId>"}]} - Set a DLQ on the queue
- Set visibility timeout at least 6 times function timeout
- Reduce batch size if poison messages are common
Why → Only failed records return to the queue.
Interview tip → AWS recommends 6x function timeout for visibility.
More on Route 53, CloudFront and Messaging
You want users routed to the nearest healthy region. Which Route 53 policy do you use?BeginnerPrimary region fails; how do you fail over DNS in a controlled way?IntermediateWhat is the difference between a CNAME and an alias record in Route 53?BeginnerRoll out a new version to 5 percent of users using DNS. How?IntermediateCloudFront serves stale content after you deployed a new JS bundle. How do you handle cache correctly?IntermediateCloudFront returns 403 from an S3 origin. List the checks.Intermediate