Currently I have multiple instances running under AWS autoscale group which polls messages from AWS SQS. My instances needs to establish connection with another instance before it start processing the incoming messages.
Sometimes it happens that one of my instances couldn't establish the connection, and I want to add a health check here to monitor the connection status and terminate the instance based on that. I don't think the default EC2 health check takes care of this scenario.
Is there any way I can add a health check to handle the above mentioned scenario.