Create Application Auto Scaling resources with AWS CloudFormation - Application Auto Scaling

Create Application Auto Scaling resources with AWS CloudFormation

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

When you use AWS 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 AWS accounts and Regions.

Application Auto Scaling and AWS CloudFormation templates

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

Example template snippets

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

Learn more about AWS CloudFormation

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