How Should Auto Scaling Applications Preserve Logs for One Year?
Short answer
C Configure the CloudWatch agent to stream the application logs to CloudWatch Logs with a one-year retention policy.
Question
What should the security engineer recommend?
Key Takeaways
This question tests durable centralized logging versus instance-bound storage; the trap is choosing EFS or EBS because it sounds persistent while overlooking whether logs are continuously shipped before termination.
Local logs on Auto Scaling EC2 instances disappear when scale-in terminates an instance. The durable solution is to stream logs with the CloudWatch agent to CloudWatch Logs and set a one-year retention policy.
Common mistake: A common wrong choice is EFS with a daily copy from the instance EBS volume, because EFS is durable but the once-a-day copy leaves up to a day of logs on an instance that can be terminated during scale-in.
Expert Analysis
Why the Answer Is Correct
Option C addresses the root cause: logs are moved continuously off the instance instead of relying on local storage surviving an Auto Scaling event. The CloudWatch agent can be baked into the AMI or supplied through the launch template, and it ships application logs to CloudWatch Logs, which is durable and independent of any single EC2 instance. CloudWatch Logs retention is configured per log group, so the security team can set a retention period of at least one year for auditing. This satisfies both durability and availability while keeping the logs centrally reviewable.
Why the Other Options Are Wrong
Option A creates an EBS log volume per instance and reattaches it after termination, but EBS is Availability Zone-bound and the process is manual, so it does not provide a reliable centralized log archive. Option B uses EFS, which is durable and shared, but the application still writes locally first and the copy runs only once a day, so scale-in can still destroy up to a day of logs. Option D only pauses termination for one hour with a lifecycle hook and SNS notification, which depends on manual review and does not retain logs for the required year. None of these options guarantees that every log record survives an Auto Scaling scale-in event.
Community Comment Notes
All visible learner comments selected option C. As 7f6aef3 framed it, the solution fixes the root cause by continuously sending logs off-instance to durable storage with configurable one-year retention. Gonzales summarized the same reasoning with the phrase "Push logs continuously off-instance" and noted that Auto Scaling becomes safe when logs do not depend on instance lifetime. Bigdata2ml added the useful retention detail that "By default, log data is stored in CloudWatch Logs indefinitely" but retention can be configured per log group, which is exactly how the one-year audit requirement is met.
Official Reference
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/WhatIsCloudWatchLogs.html
- https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html
These links open the official vendor documentation in a new tab.
Exam Strategy
When a question mentions logs disappearing at scale-in and a fixed retention period, prefer continuous shipment to a managed logging service with configurable retention over lifecycle hooks or block storage workarounds. Check whether the proposed fix moves every log record off-instance before termination, not just once a day or after a manual review window.
Frequently Asked Questions
Why doesn't EFS with a daily log copy meet the durability requirement?
Can CloudWatch Logs retention be set to one year?
Discussion 3 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 3
-
bigdata2ml 👍 1 Answered CBy default, log data is stored in CloudWatch Logs indefinitely. However, you can configure how long to store log data in a log group. Any data older than the current retention setting is deleted. You can change the log retention for each log group at any time.
-
7f6aef3 👍 1 Answered CResuelve la causa raíz: los logs se envían continuamente fuera de la instancia a un almacenamiento durable (CloudWatch Logs), sobreviviendo a los eventos de scale-in, y con retención configurable a 1 año.
-
gonzales 👍 1 Answered CPush logs continuously off-instance • Fully managed, durable storage Retention policies (≥ 1 year) (!) Auto Scaling safe
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SCS-C03 Questions
Access 86 questions with complete answers and detailed explanations.
View Full SCS-C03 Practice Test →