Create Application Auto Scaling resources with Amazon CloudFormation - Application 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 (PDF).

Create Application Auto Scaling resources with Amazon CloudFormation

Application Auto Scaling is integrated with Amazon CloudFormation, a service that helps you to model and set up your Amazon resources so that you can spend less time creating and managing your resources and infrastructure. You create a template that describes all the Amazon resources that you want, and Amazon CloudFormation provisions and configures those resources for you.

When you use Amazon CloudFormation, you can reuse your template to set up your Application Auto Scaling resources consistently and repeatedly. Describe your resources once, and then provision the same resources over and over in multiple Amazon Web Services accounts and Regions.

Application Auto Scaling and Amazon CloudFormation templates

To provision and configure resources for Application Auto Scaling and related services, you must understand Amazon CloudFormation templates. Templates are formatted text files in JSON or YAML. These templates describe the resources that you want to provision in your Amazon CloudFormation stacks. If you're unfamiliar with JSON or YAML, you can use Amazon CloudFormation Designer to help you get started with Amazon CloudFormation templates. For more information, see What is Amazon CloudFormation Designer? in the Amazon CloudFormation User Guide.

When you create a stack template for Application Auto Scaling resources, you must provide the following:

  • A namespace for the target service (for example, appstream). See the AWS::ApplicationAutoScaling::ScalableTarget reference to obtain service namespaces.

  • A scalable dimension associated with the target resource (for example, appstream:fleet:DesiredCapacity). See the AWS::ApplicationAutoScaling::ScalableTarget reference to obtain scalable dimensions.

  • A resource ID for the target resource (for example, fleet/sample-fleet). See the AWS::ApplicationAutoScaling::ScalableTarget reference for information about the syntax and examples of specific resource IDs.

  • A service-linked role for the target resource (for example, arn:aws-cn:iam::012345678910:role/aws-service-role/appstream.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_AppStreamFleet). See the Service-linked role ARN reference table to obtain role ARNs.

To learn more about Application Auto Scaling resources, see the Application Auto Scaling reference in the Amazon CloudFormation User Guide.

Example template snippets

You can find example snippets to include in Amazon CloudFormation templates in the following sections of the Amazon CloudFormation User Guide:

Learn more about Amazon CloudFormation

To learn more about Amazon CloudFormation, see the following resources: