All Products
Search
Document Center

Elastic Compute Service:Create an auto provisioning group

Last Updated:May 15, 2026

Provision a cluster of instances across multiple zones, instance types, and billing methods such as pay-as-you-go and spot instances to reduce reclamation impact and lower costs.

Important

Do not store important data on spot instances: Spot instances may be released due to market supply changes. To prevent data loss, do not store important data on spot instances.

Prerequisites

  • A service-linked role is created. Auto provisioning uses this role to manage instances in the group.

  • A launch template is created. The group inherits properties such as the image, security group, and logon credentials from a specific template version.

Procedure

  1. Go to the Auto Provisioning page.

    1. Go to ECS console - Auto Provisioning.

    2. In the upper-left corner of the page, select a region and resource group.地域

  2. On the Auto Provisioning page, click Create Supply Group and enter a group name.

  3. Configure the Basic Information:

    • Set the Billing Method:

      • Pay-as-you-go: Pay-as-you-go instances only.

      • Spot: Spot instances only.

      • Pay-as-you-go and Spot: Both pay-as-you-go and spot instances.

    • Configure the Target Capacity Settings based on the billing method.

      Pay-as-you-go

      • Capacity Delivery Mode: The capacity unit. Select Instances or vCPUs.

      • Total Capacity: The computing power to provision.

        • If set to Capacity Delivery Mode > Instances: the number of instances to deliver.

        • If set to Capacity Delivery Mode > vCPUs: the number of vCPUs to deliver.

          For example, an ecs.c6.large instance (2 vCPUs) occupies a capacity of 2.

      Spot

      • Capacity Delivery Mode: The capacity unit. Select Instances or vCPUs.

      • Total Capacity: The computing power to provision.

        • If set to Capacity Delivery Mode > Instances: the number of instances to deliver.

        • If set to Capacity Delivery Mode > vCPUs: the total number of vCPUs to deliver.

          For example, an ecs.c6.large instance (2 vCPUs) occupies a capacity of 2.

      Pay-as-you-go and Spot

      • Capacity Delivery Mode: The capacity unit. Select Instances or vCPUs.

      • Total Capacity: The sum of the Target Capacity of Spot Instances and Target Capacity of Pay-as-you-go Instances.

      • Target Capacity of Spot Instances:

        • If set to Capacity Delivery Mode > Instances: the number of spot instances to deliver.

        • If set to Capacity Delivery Mode > vCPUs: the total number of vCPUs to deliver for spot instances.

      • Target Capacity of Pay-as-you-go Instances:

        • If set to Capacity Delivery Mode > Instances: the number of pay-as-you-go instances.

        • If set to Capacity Delivery Mode > vCPUs: the total number of vCPUs for pay-as-you-go instances.

      Customize the capacity occupied by an instance type

      Call the CreateAutoProvisioningGroup API operation to customize the capacity that an instance type occupies. The LaunchTemplateConfig parameter contains the WeightedCapacity property for this purpose.

  4. Set the Instance Configuration.

    • Configuration Source: Select a Version of a Template Name as the instance configuration source.

    • Instance Configuration Mode:

      • Specify Instance Type: The system selects a suitable instance type from this list based on the specified vSwitch and Provisioning Policy.

        Note

        If Billing Method is Spot or Pay-as-you-go and Spot, you can set a Price Limit for each spot instance type. If the market price exceeds the cap, instance creation fails. Price cap options:

        • Use Automatic Bid: Bids at the real-time market price, preventing creation failures from low bids.

        • Set Maximum Price > Maximum Price: Set a fixed price cap to stay within your budget.

        • Set Maximum Price > Pay-as-you-go Price: Set a bid as a percentage of the on-demand price to ensure cost savings.

        Check spot instance price trends before setting a cap. Click Actions in the Price History column to view price history.

      • Specify Instance Attribute: The system selects an instance type based on the Provisioning Policy and properties such as VSwitch ID, Maximum Acceptable Price, vCPUs, Memory, and Architecture.

        This method helps prevent instance creation failures caused by insufficient inventory.

  5. In the Spot Instance Interruption Mode section, set the action for when the group stops a spot instance.

    Option

    Description

    Release

    Releases the stopped spot instance.

    Stop

    The stopped spot instance enters economical mode. These instances are prioritized when the group needs to add capacity.

  6. In the Provisioning Policy section, specify the instance creation policy.

    Option

    Description

    Capacity Optimization Policy

    Selects the most cost-effective instance type based on historical price fluctuations and reclamation rates.

    Note

    Spot instances may be reclaimed due to price and inventory changes. Instance types with low reclamation rates are prioritized.

    Cost Optimization Policy

    Creates instances in ascending order of vCPU unit price.

    Balanced Distribution Policy

    Takes effect only when vSwitches in different zones are specified. Creates instances evenly across multiple zones.

    Spot instances of the same instance family share resources. For example, if an ecs.c6.large instance cannot be created, other c6 types such as ecs.c6.xlarge may also fail.

    Note

    Configure different instance families to prevent all instances from being reclaimed simultaneously and ensure high availability.

  7. Configure the Advanced Options.

    Advanced option

    Description

    Group Type

    • One-time Synchronous Delivery: Creates instances only at startup. Returns a list of results in the response.

    • Continuous Delivery and Capacity Maintained : Provisions instances at startup and continuously monitors capacity. If the target is not reached, the group retries until the capacity requirement is met.

    • One-time Asynchronous Delivery: Attempts to provision instances once at startup. Does not retry if scheduling fails.

    Start Time

    The time when the group starts provisioning. Used with the end time to define the effective period.

    • Start Now: Starts provisioning immediately after the group is created.

    • Specify Start Time: Set a custom start time.

    Expiration Time

    Used with the start time to define the effective period.

    • Never: The group runs until you delete it.

    • Specify End Time: Set a custom expiration time.

    Global Maximum Price for Spot Instances

    The global price cap for all spot instances in the group. If both a per-type and global cap are set, the lower value applies.

    • Use Automatic Bid: Bids at the real-time market price, preventing creation failures from low bids and reducing costs when the market price drops.

    • Set Maximum Price: Set a fixed price cap to stay within your budget.

    Instance Shutdown Settings

    • Shut Down Instances Upon Group Expiration: If selected, instances are released when the group expires. If not selected, instances are only removed from the group. Effective only if an Expiration Time is set.

    • Shut Down Instances in Excess of Target Capacity: If selected, scaled-in instances are released when capacity exceeds the target. If not selected, scaled-in instances are only removed from the group.

  8. Confirm the configuration and click Create Supply Group.

    The group starts provisioning at the specified time. A Continuous Delivery and Maintain Capacity group continuously maintains target capacity: when a spot instance is reclaimed, it automatically launches a replacement and replaces unhealthy instances.

References