What should the SysOps Administrator do to accomplish this?
Configure the ALB health check to restart instances instead of terminating them.
Configure an AWS Lambda function to take a snapshot of all instances before they are terminated.
Implement Amazon CloudWatch Events to capture lifecycle events and trigger an AWS Lambda function for remediation.
Use an Amazon EC2 Auto Scaling lifecycle hook to pause instance termination after the instance has been removed from service.
Explanations:
The ALB health check is used to determine whether an instance is healthy or not. It cannot be configured to restart an instance; it only helps in removing unhealthy instances from the pool for traffic distribution.
While an AWS Lambda function could take a snapshot of instances, it is not a direct solution to ensure the analysis of unhealthy instances before termination. The snapshot alone does not pause termination.
CloudWatch Events can capture lifecycle events, but they do not automatically prevent the termination of instances. This option does not guarantee that unhealthy instances are analyzed before termination.
Using an EC2 Auto Scaling lifecycle hook allows you to pause instance termination when an instance is marked as unhealthy. This pause gives the Development team time to analyze the instance before it is terminated.