AWS Certified Solutions Architect – Professional — Question 613

A company runs applications on Amazon EC2 instances. The company plans to begin using an Auto Scaling group for the instances. As part of this transition, a solutions architect must ensure that Amazon CloudWatch Logs automatically collects logs from all new instances. The new Auto Scaling group will use a launch template that includes the Amazon Linux 2 AMI and no key pair.
Which solution meets these requirements?

Answer options

Correct answer: B

Explanation

Option B is correct because AWS Systems Manager Parameter Store is the standard and secure way to store CloudWatch agent configurations, and using EventBridge to trigger a Systems Manager Run Command ensures the agent is automatically configured on every new instance without requiring SSH keys. Options C and D introduce unnecessary complexity by involving AWS Lambda, AWS Config, and AWS CodeBuild for tasks that Systems Manager natively handles. Option A is less optimal than using Systems Manager Parameter Store and Run Command for enterprise-scale automated configurations.