Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

365
Visualizações
How to Fix CloudFormation error "Provided Load Balancers may not be valid. Please ensure they exist and try again

when I try to create Autoscale group with Application load balancer with the following cloudformation yml file

    LoadBalancer: 
      Type: AWS::ElasticLoadBalancingV2::LoadBalancer
      Properties: 
        Type: application
        Subnets: 
          Ref: VPCZoneIdentifier  

    AutoScalingGroup:
      Type: AWS::AutoScaling::AutoScalingGroup
      DependsOn: LoadBalancer
      Properties:
        AvailabilityZones: 
          Ref: "AvailabilityZones"
        Cooldown: 120
        DesiredCapacity:
          Ref: DesiredCapacityASG
        LaunchConfigurationName: 
          Ref: LaunchConfiguration
        MaxSize:
          Ref: MaxSizeASG
        MinSize:
          Ref: MinSizeASG
        LoadBalancerNames: 
          - Ref: "LoadBalancer"
        TargetGroupARNs:
          - !Ref TargetGroup

I got an error saying "Provided Load Balancers may not be valid. Please ensure they exist and try again. (Service: AmazonAutoScaling; Status Code: 400; Error Code: ValidationError; Request ID:)"

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

this error is happening because you used LoadBalancerNames for Application loadbalancer as it is noted here

to fix it : remove the LoadBalancerNames and keep TargetGroupARNs in the properties

LoadBalancerNames:
- Ref: "LoadBalancer"

so the yml file will be like :

    AutoScalingGroup:
      Type: AWS::AutoScaling::AutoScalingGroup
      DependsOn: LoadBalancer
      Properties:
        AvailabilityZones: 
          Ref: "AvailabilityZones"
        Cooldown: 120
        DesiredCapacity:
          Ref: DesiredCapacityASG
        LaunchConfigurationName: 
          Ref: LaunchConfiguration
        MaxSize:
          Ref: MaxSizeASG
        MinSize:
          Ref: MinSizeASG
        TargetGroupARNs:
          - !Ref TargetGroup
over 4 years ago · Santiago Trujillo Relatório

0

If you are using ansible ec2_asg module and reached here, replace load_balancers: with target_group_arns and pass the ARN of the Target Group.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda