SCS-C03 · Question #53
A company has decided to move its fleet of Linux-based web server instances to an Amazon EC2 Auto Scaling group. Currently, the instances are static and are launched manually. When an administrator…
The correct answer is C. Configure the Amazon CloudWatch agent on the instances to forward the logs to Amazon D. Configure Amazon CloudWatch Logs Insights to query the log files. Explanation Using the CloudWatch agent (C) to stream logs directly to Amazon CloudWatch Logs is the most reliable and cost-effective way to ensure logs are preserved in real time - even when Auto Scaling terminates instances during scale-in events. Once logs are centralized in…
Question
A company has decided to move its fleet of Linux-based web server instances to an Amazon EC2 Auto Scaling group. Currently, the instances are static and are launched manually. When an administrator needs to view log files, the administrator uses SSH to establish a connection to the instances and retrieves the logs manually. The company often needs to query the logs to produce results about application sessions and user issues. The company does not want its new automatically scaling architecture to result in the loss of any log files when instances are scaled in. Which combination of steps should a security engineer take to meet these requirements MOST cost-effectively? (Select TWO.)
Options
- AConfigure a cron job on the instances to forward the log files to Amazon S3 periodically.
- BConfigure AWS Glue and Amazon Athena to query the log files.
- CConfigure the Amazon CloudWatch agent on the instances to forward the logs to Amazon
- DConfigure Amazon CloudWatch Logs Insights to query the log files.
- EConfigure the instances to write the logs to an Amazon Elastic File System (Amazon EFS)
How the community answered
(40 responses)- A18% (7)
- B5% (2)
- C70% (28)
- E8% (3)
Explanation
Explanation
Using the CloudWatch agent (C) to stream logs directly to Amazon CloudWatch Logs is the most reliable and cost-effective way to ensure logs are preserved in real time - even when Auto Scaling terminates instances during scale-in events. Once logs are centralized in CloudWatch Logs, CloudWatch Logs Insights (D) provides a powerful, serverless query engine specifically designed to analyze log data, making it ideal for investigating application sessions and user issues without additional infrastructure.
Why the distractors are wrong:
- A (S3 cron job): A periodic cron job risks losing logs generated between sync intervals when an instance is suddenly terminated - not truly reliable for auto-scaling environments.
- B (AWS Glue + Athena): While capable of querying logs, this combination requires additional setup (crawlers, data catalogs, S3 storage) making it more complex and costly than CloudWatch Logs Insights for this use case.
- E (Amazon EFS): Writing logs to EFS would work but is more expensive than CloudWatch Logs and adds unnecessary complexity for log storage and querying.
Memory Tip
Think "C streams, D queries" - the CloudWatch agent Captures logs continuously, and Digs into them with Insights. Together they form a complete, native AWS logging solution that survives auto-scaling without data loss.
Topics
Community Discussion
No community discussion yet for this question.