How to upgrade AWS Application Load Balancer - amazon-web-services

I have an Application load balancer in production with "CreatedTime": "2020-08-25T13:49:18.510000+00:00",
Trying to setup traffic mirror but get error that I can't as LB created on no nitro instance.
I have an LB on my dev environment created at a later time(2022) and this works.
Can't see anywhere that shows this information. Have tried describe-load-balancers
My question is I would have expected aws to have LB updated in background periodically which doesn't seem the case. So how does one update with no downtime?

Related

Google Cloud Platform Load Balancer with Cloud Run throws 404 error

I'm trying to setup the multi region deployment with Load Balancer that drives traffic to the Cloud Run app which is deployed in the closed region to the visitor by this tutorial https://cloud.google.com/run/docs/multiple-regions
I have a Google Cloud Platform Load Balancer setup with a backend service which points to three regional network endpoint groups each of them linked to a separate instance of Cloud Run app in different regions.
When I'm accessing a Cloud Run app in any region directly by Cloud Run app URL (like this https://cms-us-east1-dpuglk7uja-ue.a.run.app) it works well.
When I'm accessing the app through the load balancer domain in the europe it works good as well.
But when I'm accessing the app through the load balancer domain in any other region (US, Asia) I'm getting a 404 error with message The requested URL was not found on this server. That’s all we know.
I've done everything explained in this tutorial and not sure what's wrong with that. Here are the regions I'm using: europe-north1, us-east1, asia-northeast1.
Is there any chance that the beta version of the Serverless NEG is still buggy?
Your load balancer configuration is the right one. You have one backend service, and 1 serverless NEG per region.
The condition to have something working is to have the SAME Cloud Run service name but deployed in different regions.

I get 404 error when doing a synchronous request to AWS Gateway with Load Balancer

I created a REST AWS API Gateway and it worked perfectly when it was targeting a single ec2 instance. I then went on to set it up with an EC2 Load Balancer for a Target Group with 2 EC2 instances. Now when I make a request that I synchronously get the status of, I get a 404 error. My guess is that the initial job was posted on one machine and then I try to access it on the other machine yielding a 404 error. I tried to enable stickiness to the target group, but that did nothing. Any suggestions?
Stickiness config
I would suggest you to check the logs on your EC2 instances and see which is the exact request routed from the LB to the EC2 machine. My experience is that LB calls the EC2 instances using their internal IP address and the URL might be modified, based on configuration.
Checking the logs will help you debug this error. With stickness you're doing good.

AWS CodeDeploy: stuck on install step

I'm running through this tutorial to create a deployment pipeline with my custom .net-based docker image.
But when I start a deployment, it's stuck on install phase, so I have to stop it manually:
After that I get a couple of running tasks with different task definitions (note :1 and :4, 'cause I've tried to run deployment 4 times by now):
They also change their state RUNNING->PROVISIONING->PENDING all the time. And the list of stopped tasks grows:
Q:
So, how to hunt down the issue with CodeDeploy? Why It's running forever?
UPDATE:
It is connected to health checks.
UPDATE:
I'm getting this:
(service dataapi-dev-service, taskSet ecs-svc/9223370487815385540) (port 80) is unhealthy in target-group dataapi-dev-tg1 due to (reason Health checks failed with these codes: [404]).
Don't quite understand, why is it failing for newly created container, 'cause the original one passes health-check.
While the ECS task is running, ELB (Elastic Load Balancer) will constantly do healthchecking the container as you config in the target group to check if the container is still responding.
From your debug message, the container (api) responded the healthcheck path with 404.
I suggest you config the healhcheck path in target group dataapi-dev-tg1.
For those who are still hitting this issue: in my case the ECS cluster had no outbound connectivity.
Possible solutions to this problem:
make security groups you use with your VPC allow outbound traffic
make sure that the route table you use with VPC has subnet associations with subnets you use with your load balancer (examine route tables)
I have able to figure it out because I enabled CloudWatch during ECS cluster creation and got CannotPullContainerError. For more information on solving this problem look into Cannot Pull Container Image Error.
Make sure your Internet Gateway is attached to your Subnets through the Route Table (Routes), if your Load Balancer is internet facing.
The error is due to health check which detected an unhealthy target.
Make sure to check your configuration in Target group settings.

Elastic Beanstalk 502 errors during autoscaling

I have an Elastic Beanstalk app running on Docker set up with autoscaling. When another instance is added to my environment as a result of autoscaling, it will 502 while the instance goes through the deployment process. If I ssh into the relevant box, I can see (via docker ps) that docker is in the process of setting itself up.
How can I prevent my load balancer from directing traffic to the instance until after the instance deployment has actually completed? I found this potentially related question on SuperUser, but I think my health check URL is set-up properly -- I have it set-up to point at the root of the domain, which definitely 502s when I navigate to it in my browser, so I suspect that's not the cause of my problem.

Grey state of elastic beanstalk environment

I have deployed a application in Amazon Elastic Beanstalk. But it became Grey State of Health somehow. Now, I am facing a lot of problem to update or change configure in this environment. So, how can I make health Green from Grey?
It must respond with 200 OK, see doc
You can set the key pair when you are deploying, then find the public IP in the EC2 instances, connect there (see doc) and check manually.