nerdexam
Amazon

SOA-C02 · Question #107

An application runs on multiple Amazon EC2 instances in an Auto Scaling group. The Auto Scaling group is configured to use the latest version of a launch template. A SysOps administrator must devise…

The correct answer is C. Update the launch template user data to install and configure the Amazon CloudWatch Logs. Option C is correct because updating the launch template's user data to install and configure the CloudWatch Logs agent is the ideal approach for Auto Scaling groups - every new instance launched from the template automatically runs the user data script, ensuring consistent…

Submitted by ashley.k· Mar 30, 2026Monitoring, Logging, and Remediation

Question

An application runs on multiple Amazon EC2 instances in an Auto Scaling group. The Auto Scaling group is configured to use the latest version of a launch template. A SysOps administrator must devise a solution that centrally manages the application logs and retains the logs for no more than 90 days. Which solution will meet these requirements?

Options

  • ALaunch an Amazon Machine Image (AMI) that is preconfigured with the Amazon CloudWatch
  • BLaunch an Amazon Machine Image (AMI) that is preconfigured with the Amazon CloudWatch
  • CUpdate the launch template user data to install and configure the Amazon CloudWatch Logs
  • DUpdate the launch template user data to install and configure the Amazon CloudWatch Logs

How the community answered

(35 responses)
  • A
    3% (1)
  • B
    17% (6)
  • C
    71% (25)
  • D
    9% (3)

Explanation

Option C is correct because updating the launch template's user data to install and configure the CloudWatch Logs agent is the ideal approach for Auto Scaling groups - every new instance launched from the template automatically runs the user data script, ensuring consistent, centralized log collection without manual intervention. Configuring the CloudWatch Logs log group with a 90-day retention policy directly satisfies the retention requirement, and since the group already uses the latest launch template version, this change propagates seamlessly to all future instances.

Why A and B are wrong: Baking the CloudWatch agent into a custom AMI is inflexible - any configuration change (like adjusting retention) requires building and registering a new AMI, updating the launch template to point to it, and cycling instances. This is operationally heavier than simply updating user data. One of these options also likely omits the 90-day retention configuration entirely, failing a key requirement.

Why D is wrong: D likely installs the CloudWatch Logs agent via user data but neglects to configure the 90-day log group retention, leaving logs retained indefinitely (the CloudWatch default is "Never expire"), which violates the stated requirement.

Memory tip: Think "launch template user data = automatic bootstrap at scale." For any requirement involving all Auto Scaling instances getting a consistent configuration (agents, scripts, settings), user data in the launch template is the go-to answer - it's less brittle than AMI-baking and doesn't require image rebuilds for config changes.

Topics

#CloudWatch Logs#Launch Templates#User Data#EC2 Auto Scaling

Community Discussion

No community discussion yet for this question.

Full SOA-C02 Practice