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
resource "aws_autoscalingplans_scaling_plan" "main" {
name = "example-dynamic-cost-optimization"
application_source {
tag_filter {
key = "application"
resource "aws_autoscalingplans_scaling_plan" "example" {
name = "example-dynamic-cost-optimization"
application_source {
tag_filter {
key = "application"
resource "aws_autoscalingplans_scaling_plan" "RHEL_Scaling_Plan" {
name = "RHEL_Scaling_Plan"
application_source {
tag_filter {
key = "name"
Parameters
-
idoptional computed - string -
namerequired - string -
scaling_plan_versionoptional computed - number -
application_sourcelist block-
cloudformation_stack_arnoptional - string -
tag_filterset block
-
-
scaling_instructionset block-
disable_dynamic_scalingoptional - bool -
max_capacityrequired - number -
min_capacityrequired - number -
predictive_scaling_max_capacity_behavioroptional - string -
predictive_scaling_max_capacity_bufferoptional - number -
predictive_scaling_modeoptional - string -
resource_idrequired - string -
scalable_dimensionrequired - string -
scaling_policy_update_behavioroptional - string -
scheduled_action_buffer_timeoptional - number -
service_namespacerequired - string -
customized_load_metric_specificationlist block-
dimensionsoptional - map from string to string -
metric_namerequired - string -
namespacerequired - string -
statisticrequired - string -
unitoptional - string
-
-
predefined_load_metric_specificationlist block-
predefined_load_metric_typerequired - string -
resource_labeloptional - string
-
-
target_tracking_configurationset block-
disable_scale_inoptional - bool -
estimated_instance_warmupoptional - number -
scale_in_cooldownoptional - number -
scale_out_cooldownoptional - number -
target_valuerequired - number -
customized_scaling_metric_specificationlist block-
dimensionsoptional - map from string to string -
metric_namerequired - string -
namespacerequired - string -
statisticrequired - string -
unitoptional - string
-
-
predefined_scaling_metric_specificationlist block-
predefined_scaling_metric_typerequired - string -
resource_labeloptional - string
-
-
-
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_roleresource 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
-
ApplicationSourcerequired - ApplicationSource -
ScalingInstructionsrequired - List of ScalingInstruction
Explanation in CloudFormation Registry
The
AWS::AutoScalingPlans::ScalingPlanresource 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.