Q33 — AWS SOA-C02 Ch.1

Question 33 of 100 | ← Chapter 1

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?

Correct Answer: A. Convert the Python script to an AWS Lambda function. Use an Amazon EventBridge (Amazon CloudWatch Events) rule to invoke the function every night.

Explanation

AWS Lambda与Amazon EventBridge的结合适用于无服务器、按需执行的定时任务场景。AWS官方文档指出,Lambda无需预置或管理服务器,按实际执行时间计费,适合周期性任务;EventBridge支持基于时间表达式的事件调度。选项B的CloudTrail用于日志记录而非事件调度;选项C和D涉及EC2实例的管理,需维护服务器并承担持续运行的潜在成本,不如无服务器方案高效。选项A的方案符合运维自动化及成本效益的最佳实践。