Spot Instance support for your Elastic Beanstalk environment
This topic describes the configuration options that are available for you to manage the capacity and load balancing of Spot Instances in your Elastic Beanstalk environment. It also provides details and examples for the methods you can use to configure these options. You can use the Elastic Beanstalk console, namespace configuration options, the Amazon CLI, or the EB CLI to manage the configuration options.
Minimize Spot instance interruptions with Capacity Rebalancing
To help minimize the impact of Spot Instance interruptions to your application, you can enable the Capacity Rebalancing option included with Amazon EC2 Auto Scaling.
Important
Demand for Spot Instances can vary significantly from moment to moment, and the availability of Spot Instances can also vary significantly depending on how many unused Amazon EC2 instances are available. It's always possible that your Spot Instance might be interrupted.
When you enable Capacity Rebalancing, EC2 automatically attempts to replace Spot Instances in an Auto Scaling group before they are interrupted. To enable
this feature use the Elastic Beanstalk console to configure the Auto Scaling group. Alternatively, you can
set the Elastic Beanstalk EnableCapacityRebalancing
configuration option to true
in the aws:autoscaling:asg namespace.
For more information, see Capacity Rebalancing in the Amazon EC2 Auto Scaling User Guide and Spot Instance Interruptions in the Amazon EC2 User Guide.
Older Instance Types and Spot Instance Support
Some older Amazon accounts might provide Elastic Beanstalk with default instance types that don't support Spot Instances. If you enable Spot Instance requests
and you see the error None of the instance types you specified supports Spot
, update your configuration with instance types that
support Spot Instances. To choose Spot Instance types, use the Spot Instance
Advisor