Create ECS instances manually or automatically

Updated at:

Create ECS instances individually or in bulk, deploy them across physical servers for high availability, or use auto provisioning and Auto Scaling to elastically manage instance clusters.

Manually create instances

  • Scenarios: Create one or more instances with the same configurations, such as instance type, zone, and billing method.

  • Quantity: The number of instances that you can create depends on the creation method.

  • Creation methods:

    Use the console

    The following methods are available in the console. Set Quantity to specify how many instances to create. The console displays the maximum allowed number.

    Note

    For instance states during the lifecycle, see Instance lifecycle.

    Method

    Scenarios

    Quickly purchase an instance

    Quick purchase provides instance types with four preset configurations and multiple packages. You can purchase a ECS instance in just a few minutes. This is the simplest method and improves configuration efficiency.

    Purchase a custom instance

    You can flexibly select configurations such as the billing method, image type, instance type, storage, bandwidth, and security group to meet your business requirements.

    Create an instance from a custom or shared image

    If you have preferred configurations for operating systems and applications, you can first create a custom image. Then, you can create an instance from the custom image to improve configuration efficiency.

    Create an instance from a community image

    You can use a community image to quickly deploy an ECS instance with a suitable operating system, applications, and data. This improves configuration efficiency.

    Purchase an instance with the same configuration

    If you need an instance with the same configuration as an existing one, you can create a new instance with that configuration. This improves the efficiency of horizontal scaling in specific scenarios.

    Clone an instance

    You can quickly create an identical or similar instance by cloning a source instance. This method is useful for scenarios such as copying a staging environment, scaling applications, disaster recovery and backup, migration, and upgrades. Cloning improves the reliability, scalability, and efficiency of your services.

    Create an instance from a launch template

    You can create a launch template in advance. After you configure the template, you can use it to create instances with one click. This method is fast and convenient.

    Use the Auto Provisioning Group API to create ECS instances in batches

    To create many pay-as-you-go instances, you can call an API operation to create them. This method is more efficient.

    Use API operations

    Call API operations to create ECS instances:

Deploy instances for high availability with deployment sets

Create low-cost elastic clusters with auto provisioning

Automatically create and release instances with Auto Scaling

  • Scenarios: Continuously maintain an instance cluster spanning multiple billing methods, zones, and instance types. Suitable for fluctuating workloads.

  • Quantity:

    Note

    For Auto Scaling (ESS) quotas, see Limits.

    • A single scaling activity can create up to 1,000 instances.

    • A single scaling group can contain up to 1,000 instances.

  • Limits:

    • Pay-as-you-go and spot instances can be automatically created.

    • Subscription instances can only be manually added to a scaling group.

  • Creation methods:

    Use the console

    Create a scaling group and a trigger task. The scaling group then automatically creates or releases instances in batches. See Quickly scale ECS instances.

    Use API operations

    Create a scaling group and a trigger task. The scaling group then automatically creates or releases instances in batches:

    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 create a scaling rule for scaling out or scaling in instances.

    5. (Optional) Call CreateAlarm to create an event-triggered task or call CreateScheduledTask to create a scheduled task.

Auto Scaling (ESS) also provides features to improve provisioning efficiency and reduce computing power delivery time. For example, you can automatically associate instances with Server Load Balancer (SLB) instances and ApsaraDB RDS instances, or configure lifecycle hooks for custom operations. See the following tutorials: