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?
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:
Install and configure the unified CloudWatch agent on the EC2 instance to push the local log file to CloudWatch Logs.
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.
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.
Enable VPC Flow Logs for the EC2 instance's elastic network interface.
How to approach this question
Full Answer
Common mistakes
Practice the full AWS Solutions Architect Professional SAP-C02 Practice Exam 5
75 questions · hints · full answers · grading
Expert