Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

371
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda