Q8 — AWS DVA-C02 Ch.2
Question 8 of 100 | ← Chapter 2
A developer is building a serverless application that requires an AWS Lambda function to be invoked every 10 minutes. What is an automated and serverless way to invoke this function?
- A. Deploy a Linux-based Amazon EC2 instance and edit its /etc/crontab file to add a command that periodically invokes the Lambda function.
- B. Configure an environment variable named PERIOD for the Lambda function and set its value to 600.
- C. Create an Amazon EventBridge rule that runs on a scheduled interval 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 an Amazon EventBridge rule that runs on a scheduled interval to invoke the Lambda function.
Explanation
Option C recommends using an Amazon EventBridge rule, which can invoke a Lambda function on a scheduled basis. This is an automated and serverless approach requiring no infrastructure maintenance or management. Other options involve using cron jobs (A), environment variables (B), or Amazon SNS topics with timers (D), none of which provide the same level of automation and serverless operation as an EventBridge rule for scheduling tasks. 【Lantern Certification provided by: swufelp1999】