A developer has designed a customer-facing application that is running on an Amazon EC2 instance. The application logs every request made to it. The application usually runs seamlessly, but a spike in traffic generates several logs that cause the disk to fill up and eventually run out of memory. Company policy requires old logs to be centralized for analysis. Which long-term solution should the developer employ to prevent the issue from reoccurring?
A) Set up log rotation to rotate the file every day. Also set up log rotation to rotate after every 100 MB and compress the file.
B) Install the Amazon CloudWatch agent on the instance to send the logs to CloudWatch. Delete the logs from the instance once they are sent to CloudWatch.
C) Enable AWS Auto Scaling on Amazon Elastic Block Store (Amazon EBS) to automatically add volumes to the instance when it reaches a specified threshold.
D) Create an Amazon EventBridge (Amazon CloudWatch Events) rule to pull the logs from the instance. Configure the rule to delete the logs after they have been pulled.
Correct Answer:
Verified
Q441: A developer is creating an event handling
Q442: A developer is attempting to use the
Q443: An organization is using Amazon API Gateway
Q444: A developer is creating AWS CloudFormation templates
Q445: A developer has created a Node.js web
Q447: A company is planning to deploy an
Q448: A developer is storing JSON files in
Q449: A Developer is developing an application that
Q450: A developer is building a highly secure
Q451: A developer is creating a website that
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents