Skip to content

Latest commit

 

History

History
55 lines (30 loc) · 2.81 KB

README.md

File metadata and controls

55 lines (30 loc) · 2.81 KB

https://aws.amazon.com/ec2/spot/ https://aws.amazon.com/asl/

Powering your Amazon ECS Cluster with Amazon EC2 Spot Instances

Example AWS CloudFormation template for running an Amazon ECS cluster on Amazon EC2 Spot Instances. Please see this blog post for more info.

Getting Started

This CloudFormation template will deploy an ECS cluster running on EC2 Spot Instances. It uses EC2 Spot Fleet to manage the Spot Instances, and includes an EC2 Spot Instance termination notice handler script to automatically set the ECS container instances in DRAINING state when a Spot Instance termination notice is detected. The handler script also publishes a message to an SNS topic created by the CloudFormation stack.

Architecture

Prerequisites

Before you can use AWS CloudFormation or any Amazon Web Services, you must first sign up for an AWS account.

To sign up for an AWS account, open https://aws.amazon.com/, and then choose Create an AWS Account.

Follow the online instructions.

Pricing

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.

Deployment

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, providing details and parameters such as the ECS cluster target capacity and the instance type(s).

You can learn more about working with CloudFormation stacks here.

AWS services used

Contributing

Comments, feedback, and pull requests are always welcome.

Authors

License

This project is licensed under the Amazon Software License - see the LICENSE.txt file for details.