Courseiva
Continuous Improvement for Existing SolutionseasyMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company has a legacy application that runs on an Amazon EC2 instance. The application writes logs to a local file. The company wants to centralize log monitoring without modifying the application code. Which solution should the company use?

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 the Amazon CloudWatch agent on the EC2 instance and configure it to tail the log file.

The Amazon CloudWatch agent can be installed on the EC2 instance without modifying the application code. It tails the local log file and sends the logs to Amazon CloudWatch Logs for centralized monitoring. Option A is incorrect because Amazon Kinesis Agent streaming to Kinesis Data Firehose adds unnecessary complexity for simple log ingestion. Option C is incorrect because it requires modifying the application code. Option D is incorrect because AWS CloudTrail captures API activity, not application logs. Option E is incorrect because it requires modifying the application code to write to Amazon S3.

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 Amazon Kinesis Agent to stream the log file to Amazon Kinesis Data Firehose.

    Why it's wrong here

    Amazon Kinesis Agent requires application-level integration to stream logs, but the stem specifies no code modification is allowed; the agent must be installed on the EC2 instance and configured to tail the file, which does not alter the application itself, yet the question demands a solution that centralises logs without any code change. This option is tempting because Kinesis Data Firehose is a common choice for log ingestion and delivery to storage or analytics services, and in scenarios where the application can be modified or an agent is acceptable, it would correctly stream logs to a centralised destination.

  • Install the Amazon CloudWatch agent on the EC2 instance and configure it to tail the log file.

    Why this is correct

    CloudWatch agent can collect logs from files and send to CloudWatch Logs.

  • Modify the application to use the AWS SDK for logging to Amazon CloudWatch Logs.

    Why it's wrong here

    Requires code changes.

  • Turn on AWS CloudTrail for the EC2 instance to capture logs.

    Why it's wrong here

    CloudTrail logs API calls, not application logs.

  • Configure the application to write logs to Amazon S3 using the AWS SDK.

    Why it's wrong here

    Requires code modification.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

This SAP-C02 question is part of Courseiva's 1,660-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.