You have a Python script that performs nightly maintenance using the AWS SDK. The script must run automatically every night with minimal operational overhead. Which option is the best choice?
Choose an answer
Tap an option to check your answer.
Correct answer: Convert the Python script into an AWS Lambda function and schedule it nightly with an EventBridge (CloudWatch Events) rule..
Why this is the answer
Converting the Python script to an AWS Lambda function and scheduling it with EventBridge (formerly CloudWatch Events) is the best option because it offers a serverless solution with minimal operational overhead. Lambda automatically manages the underlying infrastructure, and EventBridge provides reliable, scheduled invocations. Triggering a Lambda function via CloudTrail is incorrect because CloudTrail monitors and logs API calls, not for scheduling recurring tasks. Hosting the script on an EC2 instance and using EventBridge or Systems Manager to start and stop it nightly introduces more operational overhead (managing the EC2 instance, patching, etc.) compared to a serverless Lambda function. While these EC2 options could work, they are not the best choice for minimizing overhead.
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