使用 AWS CloudFormation 配置 Application Auto Scaling 资源
本节为不同 AWS 资源的 Application Auto Scaling 扩展策略和计划操作提供了 AWS CloudFormation 模板示例。
重要
当模板中包含 Application Auto Scaling 代码段时,您可能需要使用 DependsOn 属性 声明对通过模板创建的特定可扩展资源的依赖关系。这将覆盖默认并行度,并指示 AWS CloudFormation 按指定的顺序对资源进行操作。否则,可能会在完全设置资源之前应用扩展配置。
代码段类别
创建 AppStream 实例集的扩缩策略
此代码段说明如何创建策略并将其应用于使用 AWS::ApplicationAutoScaling::ScalingPolicy
资源的 AWS::AppStream::Fleet
资源。AWS::ApplicationAutoScaling::ScalableTarget
资源声明一个应用此策略的可扩展目标。Application Auto Scaling 可以扩展队列实例数,最少为 1 个实例,最多为 20 个实例。该策略将实例集的平均容量利用率保持在 75%,横向扩展和横向缩减冷却时间为 300 秒(5 分钟)。
此示例利用 Fn::Join 和 Ref 内置函数,使用在同一模板中指定的 AWS::AppStream::Fleet
资源的逻辑名称来构造 ResourceId
属性。
JSON
{ "Resources" : { "ScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : 20, "MinCapacity" : 1, "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/appstream.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_AppStreamFleet" }, "ServiceNamespace" : "appstream", "ScalableDimension" : "appstream:fleet:DesiredCapacity", "ResourceId" : { "Fn::Join" : [ "/", [ "fleet", { "Ref" : "
logicalName
" } ] ] } } }, "ScalingPolicyAppStreamFleet" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : { "Fn::Sub" : "${AWS::StackName}-target-tracking-cpu75" }, "PolicyType" : "TargetTrackingScaling", "ServiceNamespace" : "appstream", "ScalableDimension" : "appstream:fleet:DesiredCapacity", "ResourceId" : { "Fn::Join" : [ "/", [ "fleet", { "Ref" : "logicalName
" } ] ] }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : 75, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "AppStreamAverageCapacityUtilization" }, "ScaleInCooldown" : 300, "ScaleOutCooldown" : 300 } } } } }
YAML
--- Resources: ScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 20 MinCapacity: 1 RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/appstream.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_AppStreamFleet' ServiceNamespace: appstream ScalableDimension: appstream:fleet:DesiredCapacity ResourceId: !Join - / - - fleet - !Ref
logicalName
ScalingPolicyAppStreamFleet: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: !Sub ${AWS::StackName}-target-tracking-cpu75 PolicyType: TargetTrackingScaling ServiceNamespace: appstream ScalableDimension: appstream:fleet:DesiredCapacity ResourceId: !Join - / - - fleet - !ReflogicalName
TargetTrackingScalingPolicyConfiguration: TargetValue: 75 PredefinedMetricSpecification: PredefinedMetricType: AppStreamAverageCapacityUtilization ScaleInCooldown: 300 ScaleOutCooldown: 300
为 Aurora 数据库集群创建扩缩策略
在此代码段中,您注册了 AWS::RDS::DBCluster
资源。AWS::ApplicationAutoScaling::ScalableTarget
资源表示应动态扩展数据库集群以具有 1-8 个 Aurora 副本。您还可以使用 AWS::ApplicationAutoScaling::ScalingPolicy
资源将目标跟踪扩缩策略应用到集群。
在此配置中,RDSReaderAverageCPUUtilization
预定义指标用于根据 Aurora 数据库集群中所有 Aurora 副本上 40% 的平均 CPU 利用率来调整该 Aurora 数据库集群。该配置将缩减冷却时间指定为 10 分钟,并将扩展冷却时间指定为 5 分钟。
此示例利用 Fn::Sub 内置函数,使用在同一模板中指定的 AWS::RDS::DBCluster
资源的逻辑名称来构造 ResourceId
属性。
JSON
{ "Resources" : { "ScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : 8, "MinCapacity" : 1, "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/rds.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_RDSCluster" }, "ServiceNamespace" : "rds", "ScalableDimension" : "rds:cluster:ReadReplicaCount", "ResourceId" : { "Fn::Sub" : "cluster:${
logicalName
}" } } }, "ScalingPolicyDBCluster" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : { "Fn::Sub" : "${AWS::StackName}-target-tracking-cpu40" }, "PolicyType" : "TargetTrackingScaling", "ServiceNamespace" : "rds", "ScalableDimension" : "rds:cluster:ReadReplicaCount", "ResourceId" : { "Fn::Sub" : "cluster:${logicalName
}" }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : 40, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "RDSReaderAverageCPUUtilization" }, "ScaleInCooldown" : 600, "ScaleOutCooldown" : 300 } } } } }
YAML
--- Resources: ScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 8 MinCapacity: 1 RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/rds.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_RDSCluster' ServiceNamespace: rds ScalableDimension: rds:cluster:ReadReplicaCount ResourceId: !Sub cluster:${
logicalName
} ScalingPolicyDBCluster: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: !Sub ${AWS::StackName}-target-tracking-cpu40 PolicyType: TargetTrackingScaling ServiceNamespace: rds ScalableDimension: rds:cluster:ReadReplicaCount ResourceId: !Sub cluster:${logicalName
} TargetTrackingScalingPolicyConfiguration: TargetValue: 40 PredefinedMetricSpecification: PredefinedMetricType: RDSReaderAverageCPUUtilization ScaleInCooldown: 600 ScaleOutCooldown: 300
创建 DynamoDB 表的扩缩策略
此代码段说明如何使用 TargetTrackingScaling
策略类型创建策略并将其应用于使用 AWS::ApplicationAutoScaling::ScalingPolicy
资源的 AWS::DynamoDB::Table
资源。AWS::ApplicationAutoScaling::ScalableTarget
资源声明一个应用此策略的可扩展目标,其最小写入容量单位为 5,最大写入容量单位为 15。扩展策略会扩展表的写入容量吞吐量,以 DynamoDBWriteCapacityUtilization
预定义指标将目标利用率维持在 50%。
此示例利用 Fn::Join 和 Ref 内置函数,使用在同一模板中指定的 AWS::DynamoDB::Table
资源的逻辑名称来构造 ResourceId
属性。
注意
有关如何为 DynamoDB 资源创建 AWS CloudFormation 模板的更多信息,请参阅 AWS 数据库博客上的博客文章如何使用 AWS CloudFormation 配置 Amazon DynamoDB 表和索引的自动伸缩
JSON
{ "Resources" : { "WriteCapacityScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : 15, "MinCapacity" : 5, "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable" }, "ServiceNamespace" : "dynamodb", "ScalableDimension" : "dynamodb:table:WriteCapacityUnits", "ResourceId" : { "Fn::Join" : [ "/", [ "table", { "Ref" : "
logicalName
" } ] ] } } }, "WriteScalingPolicy" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : "WriteScalingPolicy", "PolicyType" : "TargetTrackingScaling", "ScalingTargetId" : { "Ref" : "WriteCapacityScalableTarget" }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : 50.0, "ScaleInCooldown" : 60, "ScaleOutCooldown" : 60, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "DynamoDBWriteCapacityUtilization" } } } } } }
YAML
--- Resources: WriteCapacityScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 15 MinCapacity: 5 RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable' ServiceNamespace: dynamodb ScalableDimension: dynamodb:table:WriteCapacityUnits ResourceId: !Join - / - - table - !Ref
logicalName
WriteScalingPolicy: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: WriteScalingPolicy PolicyType: TargetTrackingScaling ScalingTargetId: !Ref WriteCapacityScalableTarget TargetTrackingScalingPolicyConfiguration: TargetValue: 50.0 ScaleInCooldown: 60 ScaleOutCooldown: 60 PredefinedMetricSpecification: PredefinedMetricType: DynamoDBWriteCapacityUtilization
创建 Amazon ECS 服务的扩缩策略(指标:平均 CPU 和内存)
此代码段说明如何创建策略并将其应用于使用 AWS::ApplicationAutoScaling::ScalingPolicy
资源的 AWS::ECS::Service
资源。AWS::ApplicationAutoScaling::ScalableTarget
资源声明一个应用此策略的可扩展目标。Application Auto Scaling 可扩展任务的数量,最少 1 个任务,最多 6 个任务。
此示例创建两个 TargetTrackingScaling
策略类型的扩展策略。这些策略用于根据服务的平均 CPU 和内存使用率扩展 ECS 服务。此示例利用 Fn::Join 和 Ref 内置函数,使用在同一模板中指定的 AWS::ECS::Cluster
(myContainerCluster
)和 AWS::ECS::Service
(myService
)资源的逻辑名称来构造 ResourceId
属性。
JSON
{ "Resources" : { "ECSScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : "6", "MinCapacity" : "1", "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" }, "ServiceNamespace" : "ecs", "ScalableDimension" : "ecs:service:DesiredCount", "ResourceId" : { "Fn::Join" : [ "/", [ "service", { "Ref" : "
myContainerCluster
" }, { "Fn::GetAtt" : [ "myService
", "Name" ] } ] ] } } }, "ServiceScalingPolicyCPU" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : { "Fn::Sub" : "${AWS::StackName}-target-tracking-cpu70" }, "PolicyType" : "TargetTrackingScaling", "ScalingTargetId" : { "Ref" : "ECSScalableTarget" }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : 70.0, "ScaleInCooldown" : 180, "ScaleOutCooldown" : 60, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "ECSServiceAverageCPUUtilization" } } } }, "ServiceScalingPolicyMem" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : { "Fn::Sub" : "${AWS::StackName}-target-tracking-mem90" }, "PolicyType" : "TargetTrackingScaling", "ScalingTargetId" : { "Ref" : "ECSScalableTarget" }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : 90.0, "ScaleInCooldown" : 180, "ScaleOutCooldown" : 60, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "ECSServiceAverageMemoryUtilization" } } } } } }
YAML
--- Resources: ECSScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 6 MinCapacity: 1 RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService' ServiceNamespace: ecs ScalableDimension: 'ecs:service:DesiredCount' ResourceId: !Join - / - - service - !Ref
myContainerCluster
- !GetAttmyService
.Name ServiceScalingPolicyCPU: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: !Sub ${AWS::StackName}-target-tracking-cpu70 PolicyType: TargetTrackingScaling ScalingTargetId: !Ref ECSScalableTarget TargetTrackingScalingPolicyConfiguration: TargetValue: 70.0 ScaleInCooldown: 180 ScaleOutCooldown: 60 PredefinedMetricSpecification: PredefinedMetricType: ECSServiceAverageCPUUtilization ServiceScalingPolicyMem: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: !Sub ${AWS::StackName}-target-tracking-mem90 PolicyType: TargetTrackingScaling ScalingTargetId: !Ref ECSScalableTarget TargetTrackingScalingPolicyConfiguration: TargetValue: 90.0 ScaleInCooldown: 180 ScaleOutCooldown: 60 PredefinedMetricSpecification: PredefinedMetricType: ECSServiceAverageMemoryUtilization
创建 Amazon ECS 服务的扩缩策略(指标:每个目标的平均请求数)
以下示例将具有 ALBRequestCountPerTarget
预定义指标的目标跟踪扩展策略应用到 ECS 服务。该策略用于在每个目标的请求计数(每分钟)超过目标值时向 ECS 服务添加容量。由于 DisableScaleIn
的值设置为 true
,因此,目标跟踪策略不会从可扩展目标中删除容量。
此示例利用 Fn::Join 和 Fn::GetAtt 内置函数,使用在同一模板中指定的 AWS::ElasticLoadBalancingV2::LoadBalancer
(myLoadBalancer
)和 AWS::ElasticLoadBalancingV2::TargetGroup
(myTargetGroup
)资源的逻辑名称来构造 ResourceLabel
属性。
可扩展目标的 MaxCapacity
和 MinCapacity
属性以及扩展策略的 TargetValue
属性引用您在创建或更新堆栈时传递给模板的参数值。
JSON
{ "Resources" : { "ECSScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : { "Ref" : "MaxCount" }, "MinCapacity" : { "Ref" : "MinCount" }, "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService" }, "ServiceNamespace" : "ecs", "ScalableDimension" : "ecs:service:DesiredCount", "ResourceId" : { "Fn::Join" : [ "/", [ "service", { "Ref" : "
myContainerCluster
" }, { "Fn::GetAtt" : [ "myService
", "Name" ] } ] ] } } }, "ServiceScalingPolicyALB" : { "Type" : "AWS::ApplicationAutoScaling::ScalingPolicy", "Properties" : { "PolicyName" : "alb-requests-per-target-per-minute", "PolicyType" : "TargetTrackingScaling", "ScalingTargetId" : { "Ref" : "ECSScalableTarget" }, "TargetTrackingScalingPolicyConfiguration" : { "TargetValue" : { "Ref" : "ALBPolicyTargetValue" }, "ScaleInCooldown" : 180, "ScaleOutCooldown" : 30, "DisableScaleIn" : true, "PredefinedMetricSpecification" : { "PredefinedMetricType" : "ALBRequestCountPerTarget", "ResourceLabel" : { "Fn::Join" : [ "/", [ { "Fn::GetAtt" : [ "myLoadBalancer
", "LoadBalancerFullName" ] }, { "Fn::GetAtt" : [ "myTargetGroup
", "TargetGroupFullName" ] } ] ] } } } } } } }
YAML
--- Resources: ECSScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: !Ref MaxCount MinCapacity: !Ref MinCount RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ecs.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_ECSService' ServiceNamespace: ecs ScalableDimension: 'ecs:service:DesiredCount' ResourceId: !Join - / - - service - !Ref
myContainerCluster
- !GetAttmyService
.Name ServiceScalingPolicyALB: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: alb-requests-per-target-per-minute PolicyType: TargetTrackingScaling ScalingTargetId: !Ref ECSScalableTarget TargetTrackingScalingPolicyConfiguration: TargetValue: !Ref ALBPolicyTargetValue ScaleInCooldown: 180 ScaleOutCooldown: 30 DisableScaleIn: true PredefinedMetricSpecification: PredefinedMetricType: ALBRequestCountPerTarget ResourceLabel: !Join - '/' - - !GetAttmyLoadBalancer
.LoadBalancerFullName - !GetAttmyTargetGroup
.TargetGroupFullName
使用 Lambda 函数的 cron 表达式创建计划操作
此代码段使用 AWS::ApplicationAutoScaling::ScalableTarget
资源注册名为 BLUE
的函数别名(AWS::Lambda::Alias
)的预置并发。它还使用 cron 表达式创建具有重复计划的计划操作。定期计划的时区为 UTC。
它在 RoleARN
属性中使用 Fn::Join 和 Ref 内置函数以指定服务相关角色的 ARN。此示例利用 Fn::Sub 内置函数,使用在同一模板中指定的 AWS::Lambda::Function
或 AWS::Serverless::Function
资源的逻辑名称来构造 ResourceId
属性。
注意
您无法在指向未发布版本($LATEST
)的别名上分配预置并发。
有关如何为 Lambda 资源创建 AWS CloudFormation 模板的更多信息,请参阅 AWS 计算博客上的博客文章计划 AWS Lambda 预置并发性以实现重复使用峰值
JSON
{ "ScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : 250, "MinCapacity" : 0, "RoleARN" : { "Fn::Join" : [ ":", [ "arn:aws:iam:", { "Ref" : "AWS::AccountId" }, "role/aws-service-role/lambda.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_LambdaConcurrency" ] ] }, "ServiceNamespace" : "lambda", "ScalableDimension" : "lambda:function:ProvisionedConcurrency", "ResourceId" : { "Fn::Sub" : "function:${
logicalName
}:BLUE" }, "ScheduledActions" : [ { "ScalableTargetAction" : { "MinCapacity" : "250" }, "ScheduledActionName" : "my-scale-out-scheduled-action", "Schedule" : "cron(0 18 * * ? *)", "EndTime" : "2022-12-31T12:00:00.000Z" } ] } } }
YAML
ScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 250 MinCapacity: 0 RoleARN: !Join - ':' - - 'arn:aws:iam:' - !Ref 'AWS::AccountId' - role/aws-service-role/lambda.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_LambdaConcurrency ServiceNamespace: lambda ScalableDimension: lambda:function:ProvisionedConcurrency ResourceId: !Sub function:${
logicalName
}:BLUE ScheduledActions: - ScalableTargetAction: MinCapacity: 250 ScheduledActionName: my-scale-out-scheduled-action Schedule: 'cron(0 18 * * ? *)' EndTime: '2022-12-31T12:00:00.000Z'
使用竞价型实例集的 at
表达式创建计划操作
此代码段展示如何使用 AWS::ApplicationAutoScaling::ScalableTarget
资源创建两个仅对 AWS::EC2::SpotFleet
资源发生一次的计划操作。每个一次性计划操作的时区均为 UTC。
此示例利用 Fn::Join 和 Ref 内置函数,使用在同一模板中指定的 AWS::EC2::SpotFleet
资源的逻辑名称来构造 ResourceId
属性。
注意
竞价型实例集请求必须使用 maintain
作为请求类型。一次性请求或 Spot 型限制不支持自动扩展。
JSON
{ "Resources" : { "SpotFleetScalableTarget" : { "Type" : "AWS::ApplicationAutoScaling::ScalableTarget", "Properties" : { "MaxCapacity" : 0, "MinCapacity" : 0, "RoleARN" : { "Fn::Sub" : "arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ec2.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_EC2SpotFleetRequest" }, "ServiceNamespace" : "ec2", "ScalableDimension" : "ec2:spot-fleet-request:TargetCapacity", "ResourceId" : { "Fn::Join" : [ "/", [ "spot-fleet-request", { "Ref" : "
logicalName
" } ] ] }, "ScheduledActions" : [ { "ScalableTargetAction" : { "MaxCapacity" : "10", "MinCapacity" : "10" }, "ScheduledActionName" : "my-scale-out-scheduled-action", "Schedule" : "at(2022-05-20T13:00:00)" }, { "ScalableTargetAction" : { "MaxCapacity" : "0", "MinCapacity" : "0" }, "ScheduledActionName" : "my-scale-in-scheduled-action", "Schedule" : "at(2022-05-20T21:00:00)" } ] } } } }
YAML
--- Resources: SpotFleetScalableTarget: Type: AWS::ApplicationAutoScaling::ScalableTarget Properties: MaxCapacity: 0 MinCapacity: 0 RoleARN: Fn::Sub: 'arn:aws:iam::${AWS::AccountId}:role/aws-service-role/ec2.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_EC2SpotFleetRequest' ServiceNamespace: ec2 ScalableDimension: 'ec2:spot-fleet-request:TargetCapacity' ResourceId: !Join - / - - spot-fleet-request - !Ref
logicalName
ScheduledActions: - ScalableTargetAction: MaxCapacity: 10 MinCapacity: 10 ScheduledActionName: my-scale-out-scheduled-action Schedule: 'at(2022-05-20T13:00:00)' - ScalableTargetAction: MaxCapacity: 0 MinCapacity: 0 ScheduledActionName: my-scale-in-scheduled-action Schedule: 'at(2022-05-20T21:00:00)'