All Products
Search
Document Center

Elastic Compute Service:Methods to create ECS instances

Last Updated:Apr 01, 2026

ECS provides four provisioning methods to cover different scale and automation requirements. Use the table below to pick the right method for your scenario, then follow the linked guide.

Choose a provisioning method

MethodBest forMax instancesSupported billingHow to start
Manually create instancesOne or more instances with the same configurationVaries by creation methodSubscription, pay-as-you-goConsole or API
Deployment setsSpreading instances across physical servers for high availabilityVaries by deployment policySubscription, pay-as-you-go (no spot)Console or API
Auto provisioning groupsBatch provisioning across instance types and zones, with cost optimization through spot instances1,000 per groupPay-as-you-go, spot (no subscription)Console or API
Auto ScalingAutomatically maintaining clusters that respond to traffic changes over time1,000 per scaling activity or scaling groupPay-as-you-go, spot (auto-created); subscription (manually added)Console or API

Recommendation: For workloads that need ongoing lifecycle management, use Auto Scaling. For a one-time large batch with cost optimization through spot instances, use auto provisioning groups. For individual or same-configuration instances, create instances manually.

Manually create instances

Create one instance or a batch of instances that share the same configuration — instance type, zone, and billing method.

For the states an instance goes through during creation, see Instance lifecycle.

Use the ECS console

MethodWhen to use
One-click purchase of a subscription instancePurchase a subscription instance in minutes with minimal configuration. The simplest and fastest option.
Custom launchConfigure billing method, image, instance type, storage, bandwidth, and security group to match your requirements.
Launch from a custom or shared imageStart from a pre-built image that already has your preferred OS and application configuration, reducing setup time.
Launch from a community imageQuickly deploy an instance with a community-provided OS, applications, and data.
Purchase an instance with the same configurationReplicate an existing instance's configuration exactly — useful for horizontal scaling.
Clone an instanceCreate an identical or near-identical copy of a source instance. Useful for copying staging environments, disaster recovery, and migration.
Launch from a launch templateCreate instances with one click using a saved template. Saves time when you repeatedly launch the same instance type.
Use the Auto Provisioning Group API to batch create instancesCreate many pay-as-you-go instances in a single operation.

Call API operations

API operationWhat it does
RunInstancesCreates up to 100 instances in a single call. See also Batch create ECS instances.
CreateInstanceCreates a single instance.
Important

Instances created with CreateInstance start in the Stopped state. Start them manually using StartInstance before use.

Use deployment sets

Spread instances across multiple physical servers so that a single hardware failure does not take down your entire workload.

Limitations:

  • Only pay-as-you-go and subscription instances are supported. Spot instances cannot be added to a deployment set.

  • Only specific instance types are supported. See Overview of deployment sets.

  • For quota and usage limits, see the Deployment set limits section of the Limits topic.

The number of instances per deployment set depends on the deployment policy. See Overview of deployment sets.

Use the ECS console

  1. Create a deployment set.

  2. Create ECS instances in the deployment set.

Alternatively, when launching instances through Custom launch, select an existing deployment set in the Deployment Set field under Advanced Settings, or click Manage Deployment Set to create a new one.

Call API operations

  1. Call CreateDeploymentSet to create a deployment set.

  2. Specify the deployment set ID when calling RunInstances or CreateInstance to create instances in that deployment set.

To move an existing instance to a different deployment set, call ModifyInstanceDeployment. For console instructions, see Change the deployment set for an instance.

Use auto provisioning groups

Provision a large batch of instances across multiple instance types and zones in one operation. Auto provisioning groups combine pay-as-you-go and spot instances to maximize compute capacity while minimizing cost.

Limitation: Only pay-as-you-go and spot instances are supported. Subscription instances are not supported.

Scale: Up to 1,000 instances per auto provisioning group.

Use Auto Scaling

Auto Scaling automatically creates and releases instances in response to demand, keeping your cluster at the right size without manual intervention. It supports mixed billing methods and multi-zone, multi-instance-type deployments.

Limitations:

  • Only pay-as-you-go and spot instances can be automatically created in a scaling group.

  • Only subscription instances can be manually added to a scaling group.

Scale: Up to 1,000 instances per scaling activity and per scaling group. For quota details, see Limits.

Use the ECS console

Create a scaling group and configure it to automatically create or release instances. See Quickly scale ECS instances.

Call API operations

  1. Call CreateScalingGroup to create a scaling group.

  2. Call CreateScalingConfiguration to create an ECS-type scaling configuration.

  3. Call EnableScalingGroup to enable the scaling group.

  4. Call CreateScalingRule to define scale-out and scale-in rules.

  5. (Optional) Call CreateAlarm to trigger scaling on metrics, or call CreateScheduledTask to trigger scaling on a schedule.

Use cases

Auto Scaling supports lifecycle hooks and automatic association with Server Load Balancer (SLB) instances and ApsaraDB RDS instances. Common use cases include: