Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

147
Views
Agregar regla al grupo de seguridad que se crea automáticamente

Estoy usando AWS CDK para crear un ApplicationLoadBalancer que tiene el puerto 80 que acepta conexiones externas.

Quiero usar el puerto 8080 del destino al puerto de verificación de estado.

 const lb = new elb.ApplicationLoadBalancer(this, "LB", { vpc: cluster.vpc, loadBalancerName : loadBalancerName, internetFacing: true, vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, }); const listener = lb.addListener("Listener", { port: 80 }); const targetGroup = listener.addTargets("ECS", { protocol: elb.ApplicationProtocol.HTTP, port: 80, targets: [ecsAdminService] }); targetGroup.configureHealthCheck({ path: "/", port: "8080" })

En este caso, ApplicationLoadBalancer crea el grupo de seguridad automáticamente.

Sin embargo, tiene una regla de salida solo en el port 80 . Quiero agregar un port 8080

¿Cómo puedo cambiar el grupo de seguridad para que se genere automáticamente?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Cuando crea un Load Balancer con CDK si no se proporciona un grupo de seguridad, el CDK creará automáticamente un grupo de seguridad para usted.

Entonces, si desea administrar las reglas del grupo de seguridad, puede crear un grupo de seguridad con las reglas que necesita y adjuntarlo al ALB creado:

 const securityGroup1 = new ec2.SecurityGroup(this, 'SecurityGroup1', { vpc }); securityGroup1.addIngressRule( ec2.Peer.anyIpv4(), ec2.Port.tcp(80), 'allow HTTP traffic from anywhere', ); const lb = new elbv2.ApplicationLoadBalancer(this, 'LB', { vpc, internetFacing: true, securityGroup: securityGroup1, // Optional - will be automatically created otherwise });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!