Posted On: Jan 23, 2018
Amazon EC2 Spot instances receive a two-minute warning when these instances are about to be reclaimed by Amazon EC2. Starting today, the two-minute warning for Spot instances is available via Amazon CloudWatch Events CLI and will continue to be available by accessing the Instance Metadata service.
Amazon CloudWatch Events deliver near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources. By setting up simple rules to match events, CloudWatch users can route these events to one or more target functions or streams. Now CloudWatch users can setup a rule that automatically sends the EC2 Spot two-minute warning to an SNS topic to get a push notification.
In January 2015, we launched the two-minute warning for Spot instances, formally known as the Spot Instance Termination Notice. Until today the two-minute warning was accessible only by accessing the instance metadata service and Spot instance users often had to run code on the instances themselves to monitor for the two-minute warning. Spot instance users have been using the two-minute warning ever since allowing their applications to save state, upload final log files, or have instances remove themselves from an Amazon Elastic Load Balancing.
Get started with Amazon EC2 Spot instances today using the AWS Management Console, AWS Command Line Interface (CLI), or AWS SDK. Learn more about Amazon EC2 Spot here.