DVA-C02 · Question #698
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
The correct answer is B. Install the Amazon CloudWatch agent on the instance to send the logs to CloudWatch. Delete the. Installing the CloudWatch agent to stream logs off the instance centralizes logs for analysis and prevents disk space issues by enabling log deletion from the instance after successful upload. This meets company policy and ensures long-term log management without filling local st
Question
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?
Options
- ASet up log rotation to rotate the file every day. Also set up log rotation to rotate after every 100
- BInstall the Amazon CloudWatch agent on the instance to send the logs to CloudWatch. Delete the
- CEnable AWS Auto Scaling on Amazon EBS to automatically add volumes to the instance when it
- DCreate an Amazon EventBridge rule to pull the logs from the instance. Configure the rule to
How the community answered
(43 responses)- A9% (4)
- B77% (33)
- C12% (5)
- D2% (1)
Explanation
Installing the CloudWatch agent to stream logs off the instance centralizes logs for analysis and prevents disk space issues by enabling log deletion from the instance after successful upload. This meets company policy and ensures long-term log management without filling local storage.
Community Discussion
No community discussion yet for this question.