DOP-C02 · Question #62
A developer is maintaining a fleet of 50 Amazon EC2 Linux servers. The servers are part of an Amazon EC2 Auto Scaling group, and also use Elastic Load Balancing for load balancing. Occasionally, some
The correct answer is D. Use Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an Amazon. When a scale-in event occurs, a lifecycle hook pauses the instance before it is terminated and sends you a notification using Amazon EventBridge. While the instance is in the wait state, you can invoke an AWS Lambda function or connect to the instance to download logs or other da
Question
A developer is maintaining a fleet of 50 Amazon EC2 Linux servers. The servers are part of an Amazon EC2 Auto Scaling group, and also use Elastic Load Balancing for load balancing. Occasionally, some application servers are being terminated after failing ELB HTTP health checks. The developer would like to perform a root cause analysis on the issue, but before being able to access application logs, the server is terminated. How can log collection be automated?
Options
- AUse Auto Scaling lifecycle hooks to put instances in a Pending:Wait state. Create an Amazon
- BUse Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an AWS
- CUse Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an Amazon
- DUse Auto Scaling lifecycle hooks to put instances in a Terminating:Wait state. Create an Amazon
How the community answered
(22 responses)- A14% (3)
- B9% (2)
- C27% (6)
- D50% (11)
Explanation
When a scale-in event occurs, a lifecycle hook pauses the instance before it is terminated and sends you a notification using Amazon EventBridge. While the instance is in the wait state, you can invoke an AWS Lambda function or connect to the instance to download logs or other data before the instance is fully terminated. https://aws.amazon.com/blogs/infrastructure-and-automation/run-code-before-terminating-an- ec2-auto-scaling-instance/
Topics
Community Discussion
No community discussion yet for this question.