AWS Certified Developer – Associate (DVA-C02) — Question 392
A company has an application that receives batches of orders from partners every day. The application uses an AWS Lambda function to process the batches.
If a batch contains no orders, the Lambda function must publish to an Amazon Simple Notification Service (Amazon SNS) topic as soon as possible.
Which combination of steps will meet this requirement with the LEAST implementation effort? (Choose two.)
Answer options
- A. Update the existing Lambda function's code to send an Amazon CloudWatch custom metric for the number of orders in a batch for each partner.
- B. Create a new Lambda function as an Amazon Kinesis data stream consumer. Configure the new Lambda function to track orders and to publish to the SNS topic when a batch contains no orders.
- C. Set up an Amazon CloudWatch alarm that will send a notification to the SNS topic when the value of the custom metric is 0.
- D. Schedule a new Lambda function to analyze Amazon CloudWatch metrics every 24 hours to identify batches that contain no orders. Configure the Lambda function to publish to the SNS topic.
- E. Modify the existing Lambda function to log orders to an Amazon Kinesis data stream.
Correct answer: A, C
Explanation
Updating the existing Lambda function to publish a custom CloudWatch metric (Option A) and setting up a CloudWatch alarm to trigger an SNS notification when that metric is 0 (Option C) represents the simplest, most real-time, and lowest-effort architecture. Introducing Amazon Kinesis (Options B and E) adds unnecessary architectural complexity and cost. Running a scheduled Lambda function every 24 hours (Option D) does not meet the "as soon as possible" requirement.