The way I did this is the hook of the life cycle. Which can interrupt the completion process for a set time (default is 1 hour).
It is intended to resume after your work is completed, but the timeout worked to drain the hacked connection.
You have the option to add a hook to your Auto Scaling group of instances in this state in the "Termination: Pending" state. This state allows you to access these instances until they are complete.
source: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/AutoScalingGroupLifecycle.html
con: tuning through the CLI, but not so bad.
How to do it: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/adding-lifecycle-hooks.html
When creating IAM, you will need this policy:
{ "Version": "2012-10-17", "Statement": [ { "Action": [ "autoscaling:PutLifecycleHook", "autoscaling:DeleteLifecycleHook", "autoscaling:RecordLifecycleActionHeartbeat", "autoscaling:CompleteLifecycleAction", "autoscaling:DescribeAutoscalingGroups", "autoscaling:DescribeLifecycleHooks", "autoscaling:PutInstanceInStandby", "autoscaling:PutInstanceInService", "iam:AddRoleToInstanceProfile", "iam:CreateInstanceProfile", "iam:CreateRole", "iam:PassRole", "iam:ListInstanceProfiles", "ec2:Describe*" ], "Effect": "Allow", "Resource": "*" } ] }
Good luck
source share