AWS Certified Developer – Associate (DVA-C02) — Question 333
A company with multiple branch locations has an analytics and reporting application. Each branch office pushes a sales report to a shared Amazon S3 bucket at a predefined time each day. The company has developed an AWS Lambda function that analyzes the reports from all branch offices in a single pass. The Lambda function stores the results in a database.
The company needs to start the analysis once each day at a specific time.
Which solution will meet these requirements MOST cost-effectively?
Answer options
- A. Configure an S3 event notification to invoke the Lambda function when a branch office uploads a sales report.
- B. Create an AWS Step Functions state machine that invokes the Lambda function once each day at the predefined time.
- C. Configure the Lambda function to run continuously and to begin analysis only at the predefined time each day.
- D. Create an Amazon EventBridge scheduled rule that invokes the Lambda function once each day at the predefined time.
Correct answer: D
Explanation
Amazon EventBridge scheduled rules are the most cost-effective and native way to trigger an AWS Lambda function on a set daily schedule. S3 event notifications would invoke the function multiple times (for every upload) rather than once daily, which is inefficient and fails the single-pass requirement. AWS Step Functions introduces unnecessary orchestration costs for a simple scheduler task, and running Lambda continuously is not only highly expensive but also blocked by the 15-minute maximum execution timeout.