Skip to content
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

ECS Spot Termination Draining

Sets up a CloudWatch Event rule to match EC2 Spot instances that are scheduled to be terminated. If the instance is in the cluster, it is set to DRAINING. ECS will then move currently running tasks off that instance to another.


This module uses a singleton CloudWatch Event Rule to match all instances in an AWS account. It uses SNS to support multiple ECS clusters in the same account. This means that if this module is used more than once in the same account, the aws_cloudwatch_event_rule and associated resources must be imported.

Resources to import:

You can’t perform that action at this time.