EC2 Fleet and Spot Fleet - Amazon Elastic Compute Cloud

EC2 Fleet and Spot Fleet

EC2 Fleet and Spot Fleet are designed to be a useful way to launch a fleet—or group—of instances with AWS. Each instance in a fleet is based on a launch template or a set of launch parameters that you configure manually at launch.

Fleets provide the following features and benefits. These benefits make it possible for you to maximize cost savings and optimize availability and performance when running applications on multiple EC2 instances.

Multiple instance types and purchase options

In a single API call, a fleet can launch multiple instance types and purchase options (Spot and On-Demand Instances), allowing you to optimize costs through Spot Instance usage. You can also take advantage of Reserved Instance and Savings Plan discounts by using them in conjunction with On-Demand Instances in the fleet.

Distributing instances across Availability Zones

A fleet automatically attempts to distribute instances evenly across multiple Availability Zones for high availability. This provides resiliency in case an Availability Zone becomes unavailable.

Automated replacement of Spot Instances

If your fleet includes Spot Instances, it can automatically request replacement Spot capacity if your Spot Instances are interrupted or become impaired due to a change in instance health. Through Capacity Rebalancing, a fleet can also monitor and proactively replace your Spot Instances that are at an elevated risk of interruption.

EC2 Fleet is a good option if you require flexibility for managing aspects of the instance lifecycle or the scaling mechanisms. You can also use Spot Fleet, but we don't recommend that you do because it's a legacy API with no planned investment. However, if you are already using Spot Fleet, you can continue using it. Spot Fleet and EC2 Fleet offer the same core functionality.

Tip

As a general best practice, we recommend rather launching fleets of Spot and On-Demand Instances with Amazon EC2 Auto Scaling because it provides additional features you can use to manage your fleet. The list of additional features includes automatic health check replacements for both Spot and On-Demand Instances, application-based health checks, and an integration with Elastic Load Balancing to ensure an even distribution of application traffic to your healthy instances. You can also use Auto Scaling groups when you use AWS services such as Amazon ECS, Amazon EKS (self-managed node groups), and Amazon VPC Lattice. For more information, see the Amazon EC2 Auto Scaling User Guide.