※ This project is moved to awslabs/ec2-spot-labs.
Example AWS CloudFormation template for deregistration from Amazon ECS Cluster for Amazon EC2 Spot Instances via Amazon CloudWatch Events & AWS Lambda.
This CloudFormation template will deploy a rule of CloudWatch Events and a Lambda function with IAM Role. When CloudWatch Events catch EC2 Spot Instance termination notice, Lambda function hooked automatically deregister the ECS container instances from ECS Cluster. You can use this template independently.
Nothing. Lambda function searches target ECS Cluster automatically.
AWS CloudFormation is a free service; however, you are charged for the AWS resources you include in your stacks at the current rates for each. For more information about AWS pricing, go to the detail page for each product on http://aws.amazon.com.
After signing up for an AWS account, you can use AWS CloudFormation through the AWS Management Console, AWS CloudFormation API, or AWS CLI.
Use the template to create a CloudFormation stack.
You can learn more about working with CloudFormation stacks here.
