SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company has a legacy application that runs on a single EC2 instance. The application writes logs to a local file. The company wants to centralize log management without modifying the application code. Which solution is MOST operationally efficient?
⚠ Common exam trap
A common mix-up: candidates think modifying the application to use stdout with the awslogs driver is simpler, but that requires code changes, which the question explicitly prohibits.
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
✓
Install and configure the Amazon CloudWatch agent on the EC2 instance.
The Amazon CloudWatch agent can be installed on the EC2 instance without modifying application code. It reads the local log file and sends the logs to Amazon CloudWatch Logs for centralized management, making it the most operationally efficient solution.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use AWS CloudTrail to capture log file changes.
Why it's wrong here
CloudTrail records API calls, not application logs.
- ✗
Modify the application to write logs to stdout and use the awslogs driver.
Why it's wrong here
Requires code modification, which may not be feasible.
- ✓
Install and configure the Amazon CloudWatch agent on the EC2 instance.
Why this is correct
CloudWatch agent can collect logs from local files without code changes.
- ✗
Set up an Amazon S3 bucket and use an AWS Lambda function to periodically copy log files.
Why it's wrong here
Running a Lambda function to copy logs is less efficient and adds complexity.
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. 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.