aws上负载均衡器标组端口_AWS CloudFormation:目标组没有关联的负载均衡器
aws上負載均衡器標組端口
昨天,我使用AWS CloudFormation模板最終創建了ECS服務(Fargate類型),還創建了包括應用程序負載均衡器,目標組和IAM角色的資源。
創建堆棧時,出現以下錯誤:
具有targetGroupArn arn:aws:elasticloadbalancing:us-east-1:599074885545:targetgroup / a204516-S2S-Sandbox-TargetGroup / 9f4aa2eb4051a952的目標組沒有關聯的負載均衡器。 (服務:AmazonECS;狀態代碼:400;錯誤代碼:InvalidParameterException;請求ID:5da2a1ed-a216-4666-a6f9-8af18ef37af6)
The target group with targetGroupArn arn:aws:elasticloadbalancing:us-east-1:999999995545:targetgroup/MyTargetGroup/999999eb4051a952 does not have an associated load balancer. (Service: AmazonECS; Status Code: 400; Error Code: InvalidParameterException; Request ID: 54321987-a2a2-4444-abcd-8af18ef12345)我檢查了我的模板很多次,并認為它是正確的。 我在論壇上發現了一條帖子,提示該錯誤可能是由于創建ECS服務時可能尚未創建負載均衡器。
解決方案:將DependsOn屬性用于ECS服務資源。
這是我的AWS CloudFormation模板的一部分,使用DependsOn屬性:
#Create Application Load Balancer DemoApplicationLoadBalancer: Type: AWS::ElasticLoadBalancingV2::LoadBalancer Properties: Type: application Name: Demo-ALB IpAddressType: ipv4 Scheme: internet-facing # Other properties... # Create Security Groups, IAM Roles, Load Balancing Listener, ECS Cluster, ECS Task Def, etc. # Create ECS Service - with DependsOn attribute DemoSandboxService: Type: AWS::ECS::Service DependsOn: - DemoLoadBalancerListener Properties: Cluster: Ref: DemoSandboxCluster # Other properties...翻譯自: https://www.javacodegeeks.com/2020/06/aws-cloudformation-target-group-does-not-have-an-associated-load-balancer.html
aws上負載均衡器標組端口
總結
以上是生活随笔為你收集整理的aws上负载均衡器标组端口_AWS CloudFormation:目标组没有关联的负载均衡器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ai怎么渐变不了(ai怎么渐变不了有禁止
- 下一篇: HttpClient 4 API –获取