Easy1 markMultiple Choice
Domain 3.1: Operational ExcellenceMonitoringCloudWatchOperational Excellence

AWS SAP-C02 · Question 45 · Domain 3.1: Operational Excellence

A company has a legacy application running on a single large EC2 instance. The application writes logs to a local file. The operations team wants to centralize these logs in Amazon CloudWatch Logs to set up metric filters and alarms. The application cannot be modified to use the AWS SDK. How can the Architect achieve this with the LEAST operational overhead?

Answer options:

A.

Install and configure the unified CloudWatch agent on the EC2 instance to push the local log file to CloudWatch Logs.

B.

Write a cron job that copies the log file to an Amazon S3 bucket every minute. Configure an S3 event to trigger a Lambda function to write to CloudWatch.

C.

Mount an Amazon EFS file system to the EC2 instance. Configure the application to write logs to EFS. Use AWS DataSync to sync EFS to CloudWatch.

D.

Enable VPC Flow Logs for the EC2 instance's elastic network interface.

How to approach this question

Identify the standard AWS tool for collecting OS and application logs from EC2 instances.

Full Answer

A.Install and configure the unified CloudWatch agent on the EC2 instance to push the local log file to CloudWatch Logs.✓ Correct
Install and configure the unified CloudWatch agent on the EC2 instance to push the local log file to CloudWatch Logs.
The unified CloudWatch agent enables you to collect internal system-level metrics from Amazon EC2 instances and on-premises servers. It can also collect system logs and custom application log files and send them to Amazon CloudWatch Logs. This requires no changes to the application code.

Common mistakes

Over-engineering a solution with S3 and Lambda instead of using the native agent.

Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 5

75 questions · hints · full answers · grading

More questions from this exam