

An Application Load Balancer with a listener and target group.

An Amazon Virtual Private Cloud (Amazon VPC) with subnets in two Availability Zones.In this reference architecture, you use an AWS CloudFormation template to deploy the following: In this post, I walk through an example use case for taking advantage of Spot Instance interruption notices in CloudWatch Events to automatically deregister Spot Instances from an Elastic Load Balancing Application Load Balancer. This allows targets such as AWS Lambda functions or Amazon SNS topics to process Spot Instance interruption notices by creating a CloudWatch Events rule to monitor for the notice. In January 2018, the Spot Instance interruption notice also became available as an event in Amazon CloudWatch Events. Needless to say, the two-minute Spot Instance interruption notice is a powerful tool when using Spot Instances. Examples include saving the state of a job, detaching from a load balancer, or draining containers. The only difference between On-Demand Instances and Spot Instances is that Spot Instances can be interrupted by Amazon EC2 with two minutes of notification when EC2 needs the capacity back.Ĭustomers have been taking advantage of Spot Instance interruption notices available via the instance metadata service since January 2015 to orchestrate their workloads seamlessly around any potential interruptions. Post Syndicated from Chad Schmutzer original Īmazon EC2 Spot Instances are spare compute capacity in the AWS Cloud available to you at steep discounts compared to On-Demand prices.
