SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company runs a web application on Amazon EC2 instances in an Auto Scaling group across three Availability Zones. The application writes logs to local instance storage. The company wants to centralize log collection and ensure logs are retained even if instances are terminated. The current solution uses Amazon CloudWatch Logs agent, but log streams are frequently missing when instances are replaced. What should the company do to ensure complete log collection?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Configure the CloudWatch agent to use a persistent buffer on an EBS volume.
The CloudWatch agent can be configured with a persistent buffer on an EBS volume. This buffer stores log data temporarily until it is successfully sent to CloudWatch Logs. Even if an EC2 instance is terminated, the buffered logs on the EBS volume are retained and will be sent when the agent is configured to use that volume. This ensures no log data is lost during instance replacement. Option B is incorrect because S3 Lifecycle policies manage object transitions in Amazon S3, not CloudWatch logs. Option C is incorrect because the CloudWatch agent does not send logs directly to S3; it sends to CloudWatch Logs. Option D is incorrect because simply storing logs on an EBS volume without the agent's persistent buffer does not ensure automatic log collection and forwarding; the logs would only reside on the volume and not be centrally collected.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Configure the CloudWatch agent to use a persistent buffer on an EBS volume.
Why this is correct
Correct. Configuring the CloudWatch agent to use a persistent buffer on an EBS volume ensures log data is not lost during instance termination because the buffer is stored on a durable EBS volume that persists independently of the instance.
- ✗
Configure an S3 Lifecycle policy to transition logs to S3 Glacier.
Why it's wrong here
Incorrect. S3 Lifecycle policies are used to manage the lifecycle of objects in S3 buckets, but they do not affect the sending or retention of logs in CloudWatch Logs.
- ✗
Use the CloudWatch agent to send logs directly to Amazon S3.
Why it's wrong here
Incorrect. The CloudWatch agent does not have the ability to send logs directly to Amazon S3. It sends logs to Amazon CloudWatch Logs.
- ✗
Attach an EBS volume to each instance and store logs there.
Why it's wrong here
Incorrect. Simply attaching an EBS volume to store logs does not provide a mechanism for centralized log collection. The logs would remain on the volume and would not be automatically sent to CloudWatch Logs or any other central location.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SAP-C02 exam.