AWS Certified Developer – Associate (DVA-C02) — Question 447

A developer has deployed an AWS Lambda function that is subscribed to an Amazon Simple Notification Service (Amazon SNS) topic. The developer must implement a solution to add a record of each Lambda function invocation to an Amazon Simple Queue Service (Amazon SQS) queue.

Which solution will meet this requirement?

Answer options

Correct answer: C

Explanation

Because Amazon SNS invokes Lambda asynchronously, the developer can leverage Lambda destinations to route execution results. To ensure that every single invocation is recorded, destinations must be configured for both success and failure conditions. Option C achieves this by mapping both asynchronous execution outcomes to the SQS queue, while Option A only captures failures, Option D only captures successes, and Option B introduces unnecessary code complexity and execution overhead.