AWS Auto Scaling Scaling Plan

This page shows how to write Terraform and CloudFormation for AWS Auto Scaling Scaling Plan and write them securely.

aws_autoscalingplans_scaling_plan (Terraform)

The Scaling Plan in AWS Auto Scaling can be configured in Terraform with the resource name aws_autoscalingplans_scaling_plan. The following sections describe 3 examples of how to use the resource and its parameters.

Example Usage from GitHub

autoscale.tf#L21
resource "aws_autoscalingplans_scaling_plan" "main" {
  name = "example-dynamic-cost-optimization"

  application_source {
    tag_filter {
      key    = "application"
autoscaling.tf#L38
resource "aws_autoscalingplans_scaling_plan" "example" {
  name = "example-dynamic-cost-optimization"

  application_source {
    tag_filter {
      key    = "application"
ASG.tf#L53
resource "aws_autoscalingplans_scaling_plan" "RHEL_Scaling_Plan" {
  name = "RHEL_Scaling_Plan"

  application_source {
    tag_filter {
      key    = "name"

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

Manages an AWS Auto Scaling scaling plan. More information can be found in the AWS Auto Scaling User Guide.

NOTE: The AWS Auto Scaling service uses an AWS IAM service-linked role to manage predictive scaling of Amazon EC2 Auto Scaling groups. The service attempts to automatically create this role the first time a scaling plan with predictive scaling enabled is created. An aws_iam_service_linked_role resource can be used to manually manage this role. See the AWS documentation for more details.

AWS::AutoScalingPlans::ScalingPlan (CloudFormation)

The ScalingPlan in AutoScalingPlans can be configured in CloudFormation with the resource name AWS::AutoScalingPlans::ScalingPlan. 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::AutoScalingPlans::ScalingPlan resource defines an AWS Auto Scaling scaling plan. A scaling plan is used to scale application resources to size them appropriately to ensure that enough resource is available in the application at peak times and to reduce allocated resource during periods of low utilization. The following resources can be added to a scaling plan:+ Amazon EC2 Auto Scaling groups+ Amazon EC2 Spot Fleet requests+ Amazon ECS services+ Amazon DynamoDB tables and global secondary indexes+ Amazon Aurora ReplicasFor more information, see the AWS Auto Scaling User Guide.

Frequently asked questions

What is AWS Auto Scaling Scaling Plan?

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

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

For Terraform, the Aliakbarkh/Terraform-CI-CD, mhmd-deniafendi/terraform-live and darnele868410/COALFIREASSESMENT source code examples are useful. See the Terraform Example section for further details.