AWS Certified SysOps Administrator – Associate — Question 429
A SysOps administrator developed a Python script that uses the AWS SDK to conduct several maintenance tasks. The script needs to run automatically every night.
What is the MOST operationally efficient solution that meets this requirement?
Answer options
- A. Convert the Python script to an AWS Lambda function. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to invoke the function every night.
- B. Convert the Python script to an AWS Lambda function. Use AWS CloudTrail to invoke the function every night.
- C. Deploy the Python script to an Amazon EC2 instance. Use Amazon EventBride (Amazon CloudWatch Events) to schedule the instance to start and stop every night.
- D. Deploy the Python script to an Amazon EC2 instance. Use AWS Systems Manager to schedule the instance to start and stop every night.
Correct answer: A
Explanation
AWS Lambda is a serverless compute service that eliminates the operational overhead of managing underlying infrastructure, making it the most operationally efficient choice. Amazon EventBridge (formerly CloudWatch Events) can natively trigger Lambda functions on a time-based schedule using cron or rate expressions. In contrast, using Amazon EC2 instances introduces unnecessary management overhead, and AWS CloudTrail is an auditing tool that cannot schedule tasks.