本文介绍了什么是Fargate的LaunchConfiguration?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 AutoScalingGroup需要启动配置An AutoScalingGroup needs a LaunchConfiguration问题是启动配置需要ImageId和其他参数(自从我使用容器以来就没有)。The problem is that the LaunchConfiguration requires things like ImageId and other parameters which I do not have since I am using containers.使用ECS Fargate时应如何配置LaunchConfiguration?How should the LaunchConfiguration be configured when using ECS Fargate? AWS :: AutoScaling :: AutoScalingGroup https://docs.aws.amazon.com /AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html AWS::AutoScaling::AutoScalingGrouphttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-group.html AWS :: AutoScaling :: LaunchConfiguration https://docs.aws.amazon.com/AWSCloudFormation/ Latest / UserGuide / aws-properties-as-launchconfig.html AWS::AutoScaling::LaunchConfigurationhttps://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html推荐答案这是FARGATE的有效示例自动缩放策略可以看到,既不涉及启动配置也不涉及Auto Scaling组。您只需要插入 ScalingTargetId ,由于我们将使用目标跟踪扩展策略,因此基础架构将使您拥有一个目标最大为80%的系统CPU使用率。当使用率超过此值时,将发生自动缩放。This is a working example of a FARGATE autoscaling policy, that, as you can see, does not involve Launch Configuration nor Auto Scaling Groups. You just have to insert the ScalingTargetId, and since we'll be using a Target Tracking Scaling Policy, the infrastructure will grant you to have a system with a target of 80% maximum CPU usage. When the usage will be more than that, autoscaling will occur.ExampleCPUAutoScalingPolicy: Type: AWS::ApplicationAutoScaling::ScalingPolicy Properties: PolicyName: ECSCPUAutoScalingPolicy PolicyType: TargetTrackingScaling ScalingTargetId: !Ref ECSTarget TargetTrackingScalingPolicyConfiguration: DisableScaleIn: false TargetValue: 80 ScaleInCooldown: 60 ScaleOutCooldown: 60 PredefinedMetricSpecification: PredefinedMetricType: ECSServiceAverageCPUUtilization 这篇关于什么是Fargate的LaunchConfiguration?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-11 12:37