No Code here.
I am building solution based on EC2 using AutoScaling.
I have created the solution where instance will get detached from AutoScaling group before