Questions tagged [aws-application-load-balancer]

1004 questions
3
votes
3 answers

How to correctly code AWS ALB redirection in CDK (python)

Learning AWS CDK (coming from terraform). I'm currently struggling, how to write a piece of code with will allow me to create redirection as in below screenshot: Code so far which I have: class LoadBalancer(core.Construct): def __init__(self,…
Maciej
  • 1,209
  • 4
  • 16
  • 26
3
votes
0 answers

Slow response for the first request with AWS ALB

I am using AWS and setup a VPC in us-west-2. There are public and private subnets in zone B and C. Mainly I use zone b only. I have a NAT Gateway in public subnet in zone B and a t3a.large EC2 instance in private subnet in zone b too. I can run curl…
tom10271
  • 4,222
  • 5
  • 33
  • 62
3
votes
1 answer

Amazon ALB: How to set up HTTPs listener without a custom domain

I want to set up an AWS Application Load Balancer with an HTTPs listener so I can integrate with OIDC. I don't need a custom domain. To set up HTTPs, I need a certificate. How do I get a certificate for the default domain name (something like…
malana
  • 5,045
  • 3
  • 28
  • 41
3
votes
3 answers

AWS ELB Listener creation fails with Validation exception

My CloudFormation stack creation fails with a very generic error and I can't seem to figure out why. I'm creating a single-container ECS service task with ALB. Here's my stack template: AWSTemplateFormatVersion: '2010-09-09' Description: Services…
3
votes
2 answers

AWS Load Balancer Failed to Deploy

I'm trying to create AWS ALB-Ingress through EKS following the steps in the document https://docs.aws.amazon.com/eks/latest/userguide/alb-ingress.html I was successful till the step 7 in creating the controller: [ec2-user@ip-X-X-X-X eks-cluster]$…
3
votes
1 answer

Availability Zone ap-northeast-1b cannot be associated with a load balancer

I'm trying to create cluster with ECS (Fargate) with nginx definition from Get Started button. But it becomes with following error message. The following Availability Zones ap-northeast-1b cannot be associated with a load balancer. Please try a…
3
votes
1 answer

AWS ALB Host Header Attack

I'm trying to find a way to stop a host header attack from happening on my ALB. My load balancer takes care of redirecting port 80 to 443 and that is where the attack is possible. Right now the only way I can see of doing it is adding each of my…
3
votes
1 answer

Terraform AWS ALB listener rule path

I'm trying to set up a listener rule on my ALB that should route the /api path to a specified Target Group but for some reason I can't seem to get this to work. This is my set up: resource "aws_lb" "main" { name =…
Luke
  • 20,878
  • 35
  • 119
  • 178
3
votes
2 answers

Kubernetes AWS Fargate (EKS) continuously terminating pod hosting React service

I am using AWS EKS (managed Kubernetes service) and Fargate (managed nodes) to deploy a pod running a nodejs React service on port 5000. The pod switches from "Running" state to "Terminating" state continuously immediately after deployment to…
3
votes
2 answers

AWS Application Load Balancer real user ip problem

I run laravel application on AWS Elasticbeanstalk, I use Application Load Balancer. Route::get('/what-is-my-ip', function(){ return request()->ip(); }); When I run this code, my ip doesn't show, it shows the load balancer's ip addresses. Those…
3
votes
1 answer

Is there a way to encode session stickiness info about "all" target groups in AWSALB cookie in "one" request?

Our ALB is registered with multiple target groups. Each target group is a separate web application serving a different portion of the website under the same domain. Here's snippet from AWS docs about sticky session cookie encoding practice When a…
3
votes
2 answers

When to use Application Load Balancer and Network Load Balancer

I'm new to AWS. I started learning about ALB and NLB. I know ALB working in Layer 7 protocols and NLB working in layer 4 protocols. Can anyone please explain the real time example of ALB and NLB?? When to use ALB and NLB?? Even though all the web…
prem sekar
  • 71
  • 2
  • 5
3
votes
2 answers

Pipeline never finishes deploying AWS ECS Fargate Task through codepipeline

I set up a Fargate ecs service on AWS with multiple target groups and an application load balancer. It runs just as expected. Then I tried to set up a pipeline using this…
3
votes
1 answer

Random 502 errors from AWS Application load balancer

We are receiving random 502 errors from our ALB, our backend does not get hit at all as there are no logs of the request. Nothing from the ALB logs just the 502 error but nothing usable for debugging. h2 2020-03-26T14:30:52.495547Z…
3
votes
1 answer

Target group 443 gives Health checks failed with these codes: [502]

I wanted to deploy a Laravel website to amazon, so I did the following steps: Deployed the Laravel App using Elastic Beanstalk Configured Route:53 A instance to point to the Ip of Ec2 Created Application Load Balancer with two listeners one at 80…