Description of changes:
This PR adds a Spot Interruption Handler sample project to react to EC2 Spot interruptions of instances running on an Auto Scaling group or a Spot Fleet. Instances must have a tag for the handler to take actions on them. If the instance is part of an ASG, it calls the DetachInstances API to put the instance in draining state and attempt launching replacement capacity. Optionally, the handler executes commands on the instance using AWS Systems Manager Run Command. The commands to be executed are set on Parameter Store within AWS Systems Manager.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Description of changes: This PR adds a Spot Interruption Handler sample project to react to EC2 Spot interruptions of instances running on an Auto Scaling group or a Spot Fleet. Instances must have a tag for the handler to take actions on them. If the instance is part of an ASG, it calls the DetachInstances API to put the instance in draining state and attempt launching replacement capacity. Optionally, the handler executes commands on the instance using AWS Systems Manager Run Command. The commands to be executed are set on Parameter Store within AWS Systems Manager.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.