By using AWS re:Post, you agree to the Terms of Use
/Failed to expose AWS ECS Fargate Service via ALB/

Failed to expose AWS ECS Fargate Service via ALB

0

Hi,

I follow AWS Blog to provision and expose service through Application Load Balancer (https://aws.amazon.com/blogs/compute/building-deploying-and-operating-containerized-applications-with-aws-fargate/).

I found that after I follow the step, ECS service is provisioned, but when I tried to access from internet, it cannot be accessed, is there any way for me to trace it. Whether Application Load Balancer is not configure properly or what?

Thank You.

2 Answers
0
  1. Check whether the ECS tasks are running successfully or not. Looking at logs to confirm might help
  2. Is the service active and has the load balancer configured?
  3. Are the target tasks healthy?
  4. Is the load balancer active? Check access logs and CloudWatch metrics to check if it is getting requests. Are there any HTTP 400 or 500 error responses etc.

Further, you can deploy the following ECS/Fargate Load Balanced example. It uses AWS CDK. The solution should deploy successfully and you can use that to compare to your setup to get further pointers on what the issue could be.

answered 11 days ago
0

Is your ALB on a public subnet ? Did you open the ports from internet to the ALB' SG ? Same from the ALB to the container' SG?

I'd recommend one of two things though, If you want to use a friendly format (docker compose specs) to define your services and AWS Resources to deploy, checkout ECS Compose-X or AWS AppRunner. The latter is very hands-off and friendly for people who are starting with ECS and AWS. The former is too, but will allow for much more complex settings and deployments options.

Going down the CDK route is much more involved. I'd rather recommend Copilot before CDK at this point.

answered 10 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions