Create an Auto Scaling group using a launch configuration - Amazon EC2 Auto Scaling
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China.

Create an Auto Scaling group using a launch configuration

When you create an Auto Scaling group, you must specify the necessary information to configure the Amazon EC2 instances, the Availability Zones and VPC subnets for the instances, the desired capacity, and the minimum and maximum capacity limits.

Important

To configure the Amazon EC2 instances, you can specify a launch template or a launch configuration. We recommend that you use a launch template to make sure that you can use the latest features of Amazon EC2 Auto Scaling and Amazon EC2. For more information, see Create an Auto Scaling group using a launch template.

The following procedure demonstrates how to create an Auto Scaling group using a launch configuration. You cannot modify a launch configuration after it is created, but you can replace the launch configuration for an Auto Scaling group. For more information, see Change the launch configuration for an Auto Scaling group.

Prerequisites

You must have created a launch configuration. For more information, see Create a launch configuration.

To create an Auto Scaling group using a launch configuration (console)

  1. Open the Amazon EC2 console at https://console.amazonaws.cn/ec2/, and choose Auto Scaling Groups from the navigation pane.

  2. On the navigation bar at the top of the screen, choose the same Amazon Web Services Region that you used when you created the launch configuration.

  3. Choose Create an Auto Scaling group.

  4. On the Choose launch template or configuration page, for Auto Scaling group name, enter a name for your Auto Scaling group.

  5. To choose a launch configuration, do the following:

    1. For Launch template, choose Switch to launch configuration.

    2. For Launch configuration, choose an existing launch configuration.

    3. Verify that your launch configuration supports all of the options that you are planning to use, and then choose Next.

  6. On the Configure instance launch options page, under Network, for VPC, choose a VPC. The Auto Scaling group must be created in the same VPC as the security group you specified in your launch configuration.

  7. For Availability Zones and subnets, choose one or more subnets in the specified VPC. Use subnets in multiple Availability Zones for high availability. For more information, see Considerations when choosing VPC subnets.

  8. Choose Next.

    Or, you can accept the rest of the defaults, and choose Skip to review.

  9. (Optional) On the Configure advanced options page, configure the following options, and then choose Next:

    1. To register your Amazon EC2 instances with a load balancer, choose an existing load balancer or create a new one. For more information, see Use Elastic Load Balancing to distribute traffic across the instances in your Auto Scaling group. To create a new load balancer, follow the procedure in Configure an Application Load Balancer or Network Load Balancer from the Amazon EC2 Auto Scaling console.

    2. To enable your Elastic Load Balancing (ELB) health checks, for Health checks, choose ELB under Health check type. These health checks are optional when you enable load balancing.

    3. Under Health check grace period, enter the amount of time until Amazon EC2 Auto Scaling checks the Elastic Load Balancing health status of an instance after it enters the InService state. For more information, see Health check grace period.

    4. Under Additional settings, Monitoring, choose whether to enable CloudWatch group metrics collection. These metrics provide measurements that can be indicators of a potential issue, such as number of terminating instances or number of pending instances. For more information, see Monitor CloudWatch metrics for your Auto Scaling groups and instances.

    5. For Enable default instance warmup, select this option and choose the warm-up time for your application. If you are creating an Auto Scaling group that has a scaling policy, the default instance warmup feature improves the Amazon CloudWatch metrics used for dynamic scaling. For more information, see Set the default instance warmup for an Auto Scaling group.

  10. (Optional) On the Configure group size and scaling policies page, configure the following options, and then choose Next:

    1. For Desired capacity, enter the initial number of instances to launch. When you change this number to a value outside of the minimum or maximum capacity limits, you must update the values of Minimum capacity or Maximum capacity. For more information, see Set capacity limits on your Auto Scaling group.

    2. To automatically scale the size of the Auto Scaling group, choose Target tracking scaling policy and follow the directions. For more information, see Target tracking scaling policies for Amazon EC2 Auto Scaling.

    3. Under Instance scale-in protection, choose whether to enable instance scale-in protection. For more information, see Use instance scale-in protection.

  11. (Optional) To receive notifications, for Add notification, configure the notification, and then choose Next. For more information, see Get Amazon SNS notifications when your Auto Scaling group scales.

  12. (Optional) To add tags, choose Add tag, provide a tag key and value for each tag, and then choose Next. For more information, see Tag Auto Scaling groups and instances.

  13. On the Review page, choose Create Auto Scaling group.

To create an Auto Scaling group using the command line

You can use one of the following commands: