An application receives daily batches of orders from partners and uses an AWS Lambda function to process each batch. If a batch contains zero orders, the Lambda function must publish to an Amazon SNS topic as quickly as possible. Which combination of steps accomplishes this with the least implementation effort? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Modify the existing Lambda function to publish an Amazon CloudWatch custom metric that records the number of orders in each partner's batch., Create a CloudWatch alarm that triggers the SNS topic when the custom metric's value is 0..
Why this is the answer
The correct approach involves using CloudWatch custom metrics and alarms. Modifying the existing Lambda function to publish a custom metric for the number of orders in each batch (even if zero) is efficient because the function already processes the batch and knows the order count. This adds minimal overhead. Then, creating a CloudWatch alarm that monitors this custom metric and triggers an SNS topic when the metric's value is 0 directly addresses the requirement of publishing to SNS "as quickly as possible" when a batch has no orders. The other options are less efficient or more complex. Creating a new Lambda function to consume from Kinesis and track orders introduces unnecessary complexity and latency. Scheduling a new Lambda function to run every 24 hours to analyze metrics would not meet the "as quickly as possible" requirement. Changing the existing Lambda function to write to Kinesis is not directly relevant to the notification requirement for zero-order batches.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed