Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Modify a Spot Fleet request

Focus mode
Modify a Spot Fleet request - Amazon Elastic Compute Cloud

You can modify an active Spot Fleet request to complete the following tasks:

  • Increase the total target capacity and On-Demand portion

  • Decrease the total target capacity and On-Demand portion

Note

You can't modify a one-time Spot Fleet request. You can only modify a Spot Fleet request if you selected Maintain target capacity when you created the Spot Fleet request.

When you increase the total target capacity, the Spot Fleet launches additional Spot Instances. When you increase the On-Demand portion, the Spot Fleet launches additional On-Demand Instances.

When you increase the total target capacity, the Spot Fleet launches the additional Spot Instances according to the allocation strategy for its Spot Fleet request.

When you decrease the total target capacity, the Spot Fleet cancels any open requests that exceed the new target capacity. You can request that the Spot Fleet terminate Spot Instances until the size of the fleet reaches the new target capacity. If the allocation strategy is diversified, the Spot Fleet terminates instances across the pools. Alternatively, you can request that the Spot Fleet keep the fleet at its current size, but not replace any Spot Instances that are interrupted or that you terminate manually.

When a Spot Fleet terminates an instance because the target capacity was decreased, the instance receives a Spot Instance interruption notice.

To modify a Spot Fleet request (console)
  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. In the navigation pane, choose Spot Requests.

  3. Select your Spot Fleet request.

  4. Choose Actions, Modify target capacity.

  5. In Modify target capacity, do the following:

    1. Enter the new target capacity and On-Demand portion.

    2. (Optional) If you are decreasing the target capacity but want to keep the fleet at its current size, clear Terminate instances.

    3. Choose Submit.

To modify a Spot Fleet request using the AWS CLI

Use the modify-spot-fleet-request command to update the target capacity of the specified Spot Fleet request.

aws ec2 modify-spot-fleet-request \ --spot-fleet-request-id sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE \ --target-capacity 20

You can modify the previous command as follows to decrease the target capacity of the specified Spot Fleet without terminating any Spot Instances as a result.

aws ec2 modify-spot-fleet-request \ --spot-fleet-request-id sfr-73fbd2ce-aa30-494c-8788-1cee4EXAMPLE \ --target-capacity 10 \ --excess-capacity-termination-policy NoTermination
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.