AWS Auto Scaling
User Guide

Getting Started with AWS Auto Scaling

This tutorial provides a hands-on introduction to AWS Auto Scaling through the AWS Management Console, a web-based interface. To create your first scaling plan, complete the following steps.

Prerequisites

Scalable resources must be created outside of AWS Auto Scaling through the AWS Management Console, an API, or via AWS CloudFormation. To learn more about AWS CloudFormation, see the AWS CloudFormation User Guide.

For your scalable resources to be discoverable in the AWS Auto Scaling console, you need the name of your CloudFormation stack or a set of tags. Tags can be assigned in a number of different ways, such as through the console of individual services by using the Tags tab on the relevant resource screen, or from the Tag Editor. Please note that currently, ECS services and Spot Fleet requests cannot be discovered using tags.

To ensure that your ECS services are discoverable, AWS Auto Scaling needs to know which ECS cluster is running the service. For AWS Auto Scaling to know this, your ECS services must be in the same CloudFormation stack as the ECS cluster that is running the service. Otherwise, they must be part of the default cluster. To be identified correctly, the service name must also be unique across each of these ECS clusters.

Considerations

Keep the following considerations in mind:

  • You can create one scaling plan per application source and add each scalable resource to one scaling plan.

  • The scaling plan does not apply new target tracking policies to any resources with scaling policies that were created from outside of the plan. The external polices are kept instead. To apply the scaling plan to all scalable resources, delete any existing scaling policies.

Step 1: Search for Your Scalable Resources

Use one of the following procedures to specify the application source for your scalable resources.

To specify a CloudFormation stack as the application source

  1. Open the AWS Auto Scaling console at https://console.aws.amazon.com/awsautoscaling/. From the welcome page, choose Get started.

  2. Select Search by CloudFormation stack.

  3. Select your AWS CloudFormation stack and choose Next.

To specify a set of tags as the application source

  1. Open the AWS Auto Scaling console at https://console.aws.amazon.com/awsautoscaling/. From the welcome page, choose Get started.

  2. Select Search by tag.

  3. For each tag, select a tag key from Key and tag values from Value. To add tags, choose Add another row. To remove tags, choose Remove.

  4. When you are finished specifying tags, choose Next.

Step 2: Configure Your Scaling Plan

On the Configure scaling plan page, for Scaling plan details, Name, type a name for your scaling plan. For each type of resource, choose a strategy. Optimize for availability is chosen by default. To omit a type of resource from your scaling plan, clear Include in scaling plan. When you are finished, choose Next.

Step 3: Specify Custom Settings (Optional)

Use the following procedure to set custom scaling settings for one or more scalable resources. In most cases, however, the default settings should be optimal, with the possible exception of the values for minimum capacity and maximum capacity which should be carefully adjusted.

To specify custom settings

  1. On the Specify custom settings page, expand the section for the resource type you want to see, and then select any number of resources from the list.

  2. Under General settings, you can customize the following settings:

    • Include in scaling plan - If this setting is disabled, it omits the selected resources from your scaling plan.

    • Scaling strategy - Specifies a target value for the default utilization metric for that resource type. Choose one of the following options:

      • Optimize for availability

      • Balance availability and cost

      • Optimize for cost

      • Custom

    • Scaling metric - Changes the utilization metric for the scaling strategy to the specified metric.

    • Target value - Changes the target value to a specified value of between 1 and 100 percent.

  3. Under Dynamic scaling settings, you can customize the following settings:

    • Minimum capacity - Specifies the minimum value to scale to in response to a change in demand. When AWS Auto Scaling scales in, it can't decrease the capacity of the selected resources below the minimum capacity. The default value depends on the selected resources.

    • Maximum capacity - Specifies the maximum value to scale to in response to a change in demand. When AWS Auto Scaling scales out, it can't increase the capacity of the selected resources above the maximum capacity. The default value depends on the selected resources.

    • Cooldown - Specifies the amount of time, in seconds, to wait for the previous scaling activity to take effect before starting another scaling action. The default value is 300 seconds. This setting is not used if the resource is an Auto Scaling group.

  4. When you are finished specifying custom settings, choose Next.

    Note

    To revert any of your changes, select the resources and choose Revert to original. This resets the selected resources to their last known state within the scaling plan.

Step 4: Create Your Scaling Plan

On the Review and create page, review the details of your scaling plan and choose Create scaling plan.

Delete Your Scaling Plan

Deleting a scaling plan deletes the target tracking policies that AWS Auto Scaling created on your behalf. Deleting a scaling plan does not delete your AWS CloudFormation stack or the scalable resources.

To delete a scaling plan

  1. Open the AWS Auto Scaling console at https://console.aws.amazon.com/awsautoscaling/.

  2. On the Scaling plans page, select the scaling plan and choose Delete.

  3. When prompted for confirmation, choose Delete.

After you delete your scaling plan, your resources do not revert to their original capacity. Your resources are left in the state they were in when the scaling plan was deleted. For example, if your Auto Scaling group is scaled to 10 instances when you delete the scaling plan, your group will still be scaled to 10 instances after the scaling plan is deleted.