You have a lambda function that is processed asynchronously. You need a way to check and analyse issues if the function fails, for further processing at a later time. How could you accomplish this?
Correct option is :-
B. Assign a dead letter queue.
This is also mentioned in the AWS Documentation.
Any Lambda function invoked asynchronously is retried twice before the event is discarded.
If the retries fail and you're unsure why use Dead Letter Queues (DLQ) to direct unprocessed events to an Amazon SQS queue to analyze the failure.
Option A is incorrect since the metrics will only give the rate at which the function is executing.
But it cannot help debug the actual error.
Option C is incorrect because CloudWatch Events cannot help to handle failed or discarded events.
Option D is incorrect since this is only used for API monitoring.