Q57 — AWS DVA-C02 Ch.1
Question 57 of 100 | ← Chapter 1
A developer is building a serverless application that requires invoking an AWS Lambda function every 10 minutes. What is the automated, serverless approach to invoke the function?
- A. Deploy a Linux-based Amazon EC2 instance, edit the /etc/crontab file, and add a command to invoke the Lambda function on a schedule.
- B. Configure an environment variable named PERIOD for the Lambda function and set its value to 600.
- C. Create a scheduled Amazon EventBridge (Amazon CloudWatch Events) rule to invoke the Lambda function. ✓
- D. Create an Amazon Simple Notification Service (Amazon SNS) topic subscribed by the Lambda function with a 600-second timer.
Correct Answer: C. Create a scheduled Amazon EventBridge (Amazon CloudWatch Events) rule to invoke the Lambda function.
Explanation
For regularly scheduled invocations of an AWS Lambda function, the most appropriate serverless approach is using Amazon EventBridge (formerly Amazon CloudWatch Events). By creating a scheduled EventBridge rule, you can define a time interval (e.g., every 10 minutes) to trigger the Lambda function. This approach requires no server or OS management and fully aligns with serverless architecture principles. Therefore, option C is correct. Other options either involve server management (e.g., option A) or are not standard serverless solutions (e.g., options B and D).