AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 202
A company has a fleet of Amazon EC2 instances that run Linux in a single AWS account. The company is using an AWS Systems Manager Automation task across the EC2 instances.
During the most recent patch cycle, several EC2 instances went into an error state because of insufficient available disk space. A DevOps engineer needs to ensure that the EC2 instances have sufficient available disk space during the patching process in the future.
Which combination of steps will meet these requirements? (Choose two.)
Answer options
- A. Ensure that the Amazon CloudWatch agent is installed on all EC2 instances.
- B. Create a cron job that is installed on each EC2 instance to periodically delete temporary files.
- C. Create an Amazon CloudWatch log group for the EC2 instances. Configure a cron job that is installed on each EC2 instance to write the available disk space to a CloudWatch log stream for the relevant EC2 instance.
- D. Create an Amazon CloudWatch alarm to monitor available disk space on all EC2 instances. Add the alarm as a safety control to the Systems Manager Automation task.
- E. Create an AWS Lambda function to periodically check for sufficient available disk space on all EC2 instances by evaluating each EC2 instance's respective Amazon CloudWatch log stream.
Correct answer: A, D
Explanation
Answer A is correct because installing the Amazon CloudWatch agent allows for real-time monitoring of disk space usage. Answer D is also correct as creating a CloudWatch alarm will proactively alert the team when disk space is low, allowing them to address it before patching. The other options do not provide a comprehensive solution for monitoring and ensuring available disk space during the patching process.