Auto Provisioning overview

更新时间:
复制 MD 格式

Deliver ECS instance clusters across billing methods, instance types, and zones with flexible provisioning policies to optimize cost and availability.

Overview

An auto provisioning group delivers instance clusters based on the specified resource pool, target capacity, and provisioning policy. The following table describes these attributes.

Attribute

Description

Resource pool

A resource pool consists of one zone and one instance type. Specify multiple zones and instance types to increase available resource pools.

Target capacity

Target capacity is the computing power to be provisioned, measured by instances, vCPUs, or memory size. It can include spot and pay-as-you-go instances.

By default, auto provisioning groups use spot instances. You can specify a minimum pay-as-you-go capacity, which is created first. Spot instances fill the remaining capacity. If spot instances are unavailable due to insufficient resources, pay-as-you-go instances are created instead.

Provisioning policy

A provisioning policy determines which resource pools are used to create instances. For example, select the lowest-price pool to reduce costs, or distribute across zones for higher availability. See the Policy type table in this topic.

Use cases

Auto provisioning groups and spot instances suit stateless applications such as scalable website services, image rendering, big data analytics, and parallel computing. See What is spot instance?.

Billing

Auto Provisioning itself is free of charge.

You are charged for the instances created by auto provisioning groups. See What is spot instance? and Pay-as-you-go.

Important

Ensure that your account has sufficient balance. If you have overdue payments, all pay-as-you-go and spot instances are stopped. See Pay-as-you-go. The auto provisioning group cannot create instances when payments are overdue. It treats stopped instances as unhealthy and removes and releases them.

Usage notes

Before you create an auto provisioning group, complete the following preparations:

  • Specify a launch template with basic instance configurations. See Overview.

    The auto provisioning group uses attributes such as the image, security group, and logon credential from the launch template, but overrides the instance type and vSwitch with separately specified values.

  • Specify resource pools across zones and instance types.

    Each resource pool consists of one zone and one instance type. If resources in one pool are insufficient, the group uses another pool. More resource pools improve the success rate of instance creation.

    Important

    You can specify only one vSwitch per zone. If you specify multiple vSwitches in the same zone, only the first one takes effect.

  • Specify the target capacity and the proportions of different instance types.

    Target capacity can be measured by instances, vCPUs, or memory size. Auto Provisioning uses weights to indicate the capacity contribution of each instance type. The following rules apply:

    • If measured by instances, all instance types have equal weight.

    • If measured by vCPUs, weight varies by vCPU count. Instance types with more vCPUs have higher weights and fewer instances are needed to meet the target capacity.

    • If the target capacity involves multiple factors such as vCPUs and memory, evaluate each instance type's capacity contribution and assign a weight accordingly. A larger weight means greater computing power contribution.

      Note

      You can specify instance type weights only when creating auto provisioning groups by calling the CreateAutoProvisioningGroup operation.

    Using pay-as-you-go instances for minimum computing power and spot instances for the remainder can significantly reduce costs.

  • Specify the provisioning policy.

    The following table describes the available provisioning policies.

    Policy

    Application to

    Method

    Description

    Capacity optimization policy (capacity-optimized)

    Spot instance

    • ECS console (spot instance): Set Provisioning Policy to Capacity Optimization Policy.

    • API operation (spot instance): Set SpotAllocationStrategy to capacity-optimized.

    Selects the most cost-effective resource pool with the highest creation success rate based on prices and reclaim rates. This reduces the likelihood of spot instance reclamation and ensures stable capacity.

    Balanced distribution policy (diversified)

    Spot instance

    • ECS console (spot instance): Set Provisioning Policy to Balanced Distribution Policy.

    • API operation (spot instance): Set SpotAllocationStrategy to diversified.

    Distributes instances evenly across resource pools in multiple zones. This prevents creation failures from insufficient resources in a single zone and improves disaster recovery.

    Cost optimization policy (lowest-price)

    Spot and pay-as-you-go instances

    • ECS console (spot instance): Set Provisioning Policy to Cost Optimization Policy.

    • API operation (spot instance): Set SpotAllocationStrategy to lowest-price.

    • API operation (pay-as-you-go instance): Set PayAsYouGoAllocationStrategy to lowest-price.

    Uses the resource pool with the lowest vCPU unit price to create instances.

    When creating an auto provisioning group via the CreateAutoProvisioningGroup operation, you can use the cost optimization policy for spot instances and set SpotInstancePoolsToUseCount to specify the number of lowest-cost resource pools.

    For example, if you specify 100 spot instances and set SpotInstancePoolsToUseCount to 5, each pool creates 20 instances. When one pool's spot instances are reclaimed, instances in other pools remain available.

    Priority-based policy (prioritized)

    Pay-as-you-go instance

    API operation (pay-as-you-go instance): Set PayAsYouGoAllocationStrategy to prioritized.

    Resource pools are used in descending order of priority. When a high-priority pool has insufficient resources, lower-priority pools are used.

    Call the CreateAutoProvisioningGroup operation and set LaunchTemplateConfig.N.Priority to specify pool priorities.

    Important

    Provisioning policies for pay-as-you-go instances can only be specified via the CreateAutoProvisioningGroup operation. Otherwise, the cost optimization policy is used by default.

  • Specify maximum hourly prices.

    Set maximum hourly prices for spot instances per resource pool or across all pools. If prices exceed the maximum, the group stops creating spot instances even if the target capacity is not met, keeping costs within budget.

    Use reserved instances or savings plans to reduce pay-as-you-go costs. See Overview of reserved instances and Overview of savings plans.

  • Specify whether to maintain the target capacity.

    An auto provisioning group can be set to One-time Delivery or Continuous Delivery and Maintain Capacity. With Continuous Delivery, the group monitors instance health, compares real-time capacity against the target, and automatically creates instances to maintain the target capacity.

After an auto provisioning group starts, it selects resource pools based on the provisioning policy to meet the target capacity. For example, to provision a cluster of 12 instances with the MyLaunchTemplate template and improve availability:

  1. Specify multiple resource pools based on MyLaunchTemplate.

  2. Specify the capacity proportions of spot and pay-as-you-go instances.

  3. Specify the provisioning policy.

image

Limitations

  • Auto provisioning groups cannot provision instances across regions.

  • Each auto provisioning group uses a single version of one launch template for basic configurations, but can specify multiple resource pools with different instance types.

  • Each auto provisioning group supports up to 20 resource pools. Each pool is a combination of one zone and one instance type.

  • Each auto provisioning group can create up to 1,000 instances.

Auto Provisioning configuration guidelines

To use Auto Provisioning:

  1. (Conditional) Grant permissions for Auto Provisioning operations.

    If you use a RAM user, grant the RAM user permissions to perform operations on auto provisioning groups. See Manage service-linked role.

  2. Create a service-linked role for Auto Provisioning.

    See Manage service-linked role.

  3. Create an instance launch template, then create an auto provisioning group.

    For configuration details, see Configure group.

  4. Manage an auto provisioning group:

References