Question 1 · choose 1
Amazon S3 event notifications invoke an AWS Lambda function asynchronously. For every event that Lambda stops processing, the team wants a single JSON document that holds the original event, the function's full response payload, the condition that ended processing, and how many times the function was invoked. Which configuration meets this requirement without code changes?
- AAn Amazon SQS standard queue as the function's dead-letter queue
- BRetry attempts set to 0 for asynchronous invocations
- CAn Amazon SQS standard queue as an on-failure destination
- DA maximum event age of 6 hours so that failed events stay in Lambda's queue
Show the answer and why
AAn Amazon SQS standard queue as the function's dead-letter queue
Incorrect
Lambda sends the event as-is, adding only RequestID, ErrorCode and the first 1 KB of the error message as message attributes. There is no response payload, no attempt count and no condition.
BRetry attempts set to 0 for asynchronous invocations
Incorrect
Fewer retries only make Lambda discard a failing event sooner. Nothing is kept unless a destination or dead-letter queue is configured.
CAn Amazon SQS standard queue as an on-failure destination
Correct
Lambda sends one invocation record in JSON with the request payload, the response payload, and a request context that includes the condition, such as RetriesExhausted, and approximateInvokeCount.
DA maximum event age of 6 hours so that failed events stay in Lambda's queue
Incorrect
The maximum event age limits how long an event may wait in the asynchronous queue. When an event fails all retries or exceeds that age, Lambda discards it.
Dead-letter queues and on-failure destinations both catch events that failed all attempts or expired. A dead-letter queue keeps the event plus three attributes; only a destination's invocation record adds the full response, the condition and the invoke count.
AWS documentation