AWS Application Auto Scaling Policy

This page shows how to write Terraform and CloudFormation for Application Auto Scaling Policy and write them securely.

aws_appautoscaling_policy (Terraform)

The Policy in Application Auto Scaling can be configured in Terraform with the resource name aws_appautoscaling_policy. The following sections describe 1 example of how to use the resource and its parameters.

Example Usage from GitHub

autoscaling_policy.tf#L1
resource "aws_appautoscaling_policy" "ecs_policy_memory" {
  name               = "memory-autoscaling"
  policy_type        = "TargetTrackingScaling"
  resource_id        = aws_appautoscaling_target.asg_ecs_target.resource_id
  scalable_dimension = aws_appautoscaling_target.asg_ecs_target.scalable_dimension
  service_namespace  = aws_appautoscaling_target.asg_ecs_target.service_namespace

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an Application AutoScaling Policy resource.

AWS::ApplicationAutoScaling::ScalingPolicy (CloudFormation)

The ScalingPolicy in ApplicationAutoScaling can be configured in CloudFormation with the resource name AWS::ApplicationAutoScaling::ScalingPolicy. The following sections describe how to use the resource and its parameters.

Example Usage from GitHub

An example could not be found in GitHub.

Parameters

Explanation in CloudFormation Registry

The AWS::ApplicationAutoScaling::ScalingPolicy resource defines a scaling policy that Application Auto Scaling uses to adjust the capacity of a scalable target. For more information, see PutScalingPolicy in the Application Auto Scaling API Reference. For more information about Application Auto Scaling scaling policies, see Target tracking scaling policies and Step scaling policies in the Application Auto Scaling User Guide.

Frequently asked questions

What is AWS Application Auto Scaling Policy?

AWS Application Auto Scaling Policy is a resource for Application Auto Scaling of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Application Auto Scaling Policy?

For Terraform, the sorialuise/infra-terraform source code example is useful. See the Terraform Example section for further details.