Skip to content

Commit

Permalink
feat(client-ec2): This release adds a new price capacity optimized al…
Browse files Browse the repository at this point in the history
…location strategy for Spot Instances to help customers optimize provisioning of Spot Instances via EC2 Auto Scaling, EC2 Fleet, and Spot Fleet. It allocates Spot Instances based on both spare capacity availability and Spot Instance price.
  • Loading branch information
awstools committed Nov 10, 2022
1 parent 8829f71 commit 6f4d604
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 69 deletions.
1 change: 1 addition & 0 deletions clients/client-ec2/src/models/models_0.ts
Expand Up @@ -2473,6 +2473,7 @@ export enum AllocationStrategy {
CAPACITY_OPTIMIZED_PRIORITIZED = "capacityOptimizedPrioritized",
DIVERSIFIED = "diversified",
LOWEST_PRICE = "lowestPrice",
PRICE_CAPACITY_OPTIMIZED = "priceCapacityOptimized",
}

export enum AllocationType {
Expand Down
65 changes: 43 additions & 22 deletions clients/client-ec2/src/models/models_1.ts
Expand Up @@ -1210,6 +1210,7 @@ export enum SpotAllocationStrategy {
CAPACITY_OPTIMIZED_PRIORITIZED = "capacity-optimized-prioritized",
DIVERSIFIED = "diversified",
LOWEST_PRICE = "lowest-price",
PRICE_CAPACITY_OPTIMIZED = "price-capacity-optimized",
}

export enum SpotInstanceInterruptionBehavior {
Expand Down Expand Up @@ -1275,28 +1276,48 @@ export interface SpotOptionsRequest {
* <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
* pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>
* <code>lowest-price</code> - EC2 Fleet launches instances from the lowest-price Spot Instance pool that
* has available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances
* come from the next cheapest pool that has available capacity. If a pool runs out of
* capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your
* request by drawing from the next cheapest pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools.</p>
* <p>
* <code>diversified</code> - EC2 Fleet launches instances from all
* of the Spot Instance pools that you specify.</p>
* <p>
* <code>capacity-optimized</code> (recommended) - EC2 Fleet
* launches instances from Spot Instance pools with optimal capacity for the number of instances that
* are launching. To give certain instance types a higher chance of launching first, use
* <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacity-optimized-prioritized</code> is supported only if your fleet uses a
* launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
*
* <dl>
* <dt>price-capacity-optimized (recommended)</dt>
* <dd>
* <p>EC2 Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
* </dd>
* <dt>capacity-optimized</dt>
* <dd>
* <p>EC2 Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. To give certain
* instance types a higher chance of launching first, use
* <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a
* launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
* </dd>
* <dt>diversified</dt>
* <dd>
* <p>EC2 Fleet requests instances from all of the Spot Instance pools that you
* specify.</p>
* </dd>
* <dt>lowest-price</dt>
* <dd>
* <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that
* has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances
* come from the next lowest priced pool that has available capacity. If a pool runs out of
* capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your
* request by drawing from the next lowest priced pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools. Because this strategy only considers instance
* price and not capacity availability, it might lead to high interruption rates.</p>
* </dd>
* </dl>
*
* <p>Default: <code>lowest-price</code>
* </p>
*/
Expand Down
64 changes: 42 additions & 22 deletions clients/client-ec2/src/models/models_3.ts
Expand Up @@ -3598,28 +3598,48 @@ export interface SpotOptions {
* <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
* pools specified by the EC2 Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-allocation-strategy.html">Allocation strategies for Spot Instances</a> in the
* <i>Amazon EC2 User Guide</i>.</p>
* <p>
* <code>lowest-price</code> - EC2 Fleet launches instances from the lowest-price Spot Instance pool that
* has available capacity. If the cheapest pool doesn't have available capacity, the Spot Instances
* come from the next cheapest pool that has available capacity. If a pool runs out of
* capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your
* request by drawing from the next cheapest pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools.</p>
* <p>
* <code>diversified</code> - EC2 Fleet launches instances from all of the Spot Instance pools that you
* specify.</p>
* <p>
* <code>capacity-optimized</code> (recommended) - EC2 Fleet launches instances from Spot Instance pools
* with optimal capacity for the number of instances that are launching. To give certain
* instance types a higher chance of launching first, use
* <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacity-optimized-prioritized</code> is supported only if your fleet uses a
* launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
*
* <dl>
* <dt>price-capacity-optimized (recommended)</dt>
* <dd>
* <p>EC2 Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. EC2 Fleet then requests Spot Instances from the lowest priced of these pools.</p>
* </dd>
* <dt>capacity-optimized</dt>
* <dd>
* <p>EC2 Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. To give certain
* instance types a higher chance of launching first, use
* <code>capacity-optimized-prioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacity-optimized-prioritized</code> is supported only if your EC2 Fleet uses a
* launch template. Note that if the On-Demand <code>AllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
* </dd>
* <dt>diversified</dt>
* <dd>
* <p>EC2 Fleet requests instances from all of the Spot Instance pools that you
* specify.</p>
* </dd>
* <dt>lowest-price</dt>
* <dd>
* <p>EC2 Fleet requests instances from the lowest priced Spot Instance pool that
* has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances
* come from the next lowest priced pool that has available capacity. If a pool runs out of
* capacity before fulfilling your desired capacity, EC2 Fleet will continue to fulfill your
* request by drawing from the next lowest priced pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools. Because this strategy only considers instance
* price and not capacity availability, it might lead to high interruption rates.</p>
* </dd>
* </dl>
*
* <p>Default: <code>lowest-price</code>
* </p>
*/
Expand Down
64 changes: 42 additions & 22 deletions clients/client-ec2/src/models/models_4.ts
Expand Up @@ -5041,28 +5041,48 @@ export interface SpotFleetRequestConfigData {
* <p>The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance
* pools specified by the Spot Fleet launch configuration. For more information, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html">Allocation
* strategies for Spot Instances</a> in the <i>Amazon EC2 User Guide</i>.</p>
* <p>
* <code>lowestPrice</code> - Spot Fleet launches instances from the lowest-price Spot Instance pool
* that has available capacity. If the cheapest pool doesn't have available capacity, the
* Spot Instances come from the next cheapest pool that has available capacity. If a pool runs out
* of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your
* request by drawing from the next cheapest pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools.</p>
* <p>
* <code>diversified</code> - Spot Fleet launches instances from all of the Spot Instance pools that you
* specify.</p>
* <p>
* <code>capacityOptimized</code> (recommended) - Spot Fleet launches instances from Spot Instance pools
* with optimal capacity for the number of instances that are launching. To give certain
* instance types a higher chance of launching first, use
* <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a
* launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
*
* <dl>
* <dt>priceCapacityOptimized (recommended)</dt>
* <dd>
* <p>Spot Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.</p>
* </dd>
* <dt>capacityOptimized</dt>
* <dd>
* <p>Spot Fleet identifies the pools with
* the highest capacity availability for the number of instances that are launching. This means
* that we will request Spot Instances from the pools that we believe have the lowest chance of interruption
* in the near term. To give certain
* instance types a higher chance of launching first, use
* <code>capacityOptimizedPrioritized</code>. Set a priority for each instance type by
* using the <code>Priority</code> parameter for <code>LaunchTemplateOverrides</code>. You can
* assign the same priority to different <code>LaunchTemplateOverrides</code>. EC2 implements
* the priorities on a best-effort basis, but optimizes for capacity first.
* <code>capacityOptimizedPrioritized</code> is supported only if your Spot Fleet uses a
* launch template. Note that if the <code>OnDemandAllocationStrategy</code> is set to
* <code>prioritized</code>, the same priority is applied when fulfilling On-Demand
* capacity.</p>
* </dd>
* <dt>diversified</dt>
* <dd>
* <p>Spot Fleet requests instances from all of the Spot Instance pools that you
* specify.</p>
* </dd>
* <dt>lowestPrice</dt>
* <dd>
* <p>Spot Fleet requests instances from the lowest priced Spot Instance pool that
* has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances
* come from the next lowest priced pool that has available capacity. If a pool runs out of
* capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your
* request by drawing from the next lowest priced pool. To ensure that your desired capacity is
* met, you might receive Spot Instances from several pools. Because this strategy only considers instance
* price and not capacity availability, it might lead to high interruption rates.</p>
* </dd>
* </dl>
*
* <p>Default: <code>lowestPrice</code>
* </p>
*/
Expand Down

0 comments on commit 6f4d604

Please sign in to comment.