AWS Fargate Angular dockerize application not exposed to public ip

Starting out with Fargate to try to host an Angular dockerized application with NGINX. But it just wont work when I open the public ip to see the application. However the tutorial says it would.

I have tested the docker image and it works when I expose it on 8080 (good to know maybe is that in the Dockerfile I also have an expose 8080 included. Also NGINX config listens on 8080.

Steps taken:

Created a aws fargate cluster (serverless)

Task definition with below port mappings and 0,5cpu and image uri from private aws repository

Created Service with that task in it and tried with and without a ‘application load balancer’ with container 8080:8080 and listen on 8080 HTTP

Service starts and task is running, but I have tried all the IP’s I could find in the browser and with curl – with and without the 8080 port added, but nothing seems to work. What may I missing?

"portMappings": [
{
"name": "ui-8080-tcp",
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}
],

I am going to try to cancel out my docker image and replace it with a base NGINX image, but in the meantime someone might have an answer?

I would expect a fargate cluster work out the box when you add a working docker container image on A ip like with K8s where you can curl the pod ip and check if that part is working. Now I click together something but can’t ‘peel the union’

Recognized by AWS

New contributor

Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

1

You need to make sure you are deploying to a public subnet (a subnet with a route to an Internet Gateway), and you have configured ECS to assign a public IP address to the task. Then make sure the IP address you are using in the browser is the public IP address (not an IP address that is in your VPC’s CIDR block).

You also need to make sure you have a security group assigned to the ECS task that allows inbound traffic on port 8080.

You need to make sure you are adding the port :8080 to the address you are trying to access in your browser. Without adding that, the browser will try to use the default port 80 which is not going to work here since you don’t have anything listening on port 80.

If none of the above fixes the issue, you may need to edit your question to include your full Nginx config file.


I would expect a fargate cluster work out the box when you add a working docker container image on A ip like with K8s where you can curl the pod ip and check if that part is working.

Running k8s on AWS, via AWS EKS, would have the same networking configuration requirements as AWS ECS, that I have outlined in my answer. There is definitely a minimum VPC/Security Group/Network configuration to make this sort of thing work, with ECS or EKS or anything else on AWS. Things aren’t generally exposed to the public Internet on AWS by default, as that could be a security issue, you have to explicitly take a few steps to expose things to the Internet.

Recognized by AWS

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật