Can private fargate instances access public sites via internet gateway instead of a NAT?

0

Can private fargate instances (containers with private ip in private subnets) get access to public sites via internet gateway instead of a NAT?

quldude
feita há 6 meses243 visualizações
2 Respostas
1
Resposta aceita

Hello.

A NAT gateway is required if your containers are running in a private subnet.
If you can start a container in a public subnet, you can use an internet gateway to communicate.
I think this document is easy to understand.
https://docs.aws.amazon.com/AmazonECS/latest/bestpracticesguide/networking-outbound.html

profile picture
ESPECIALISTA
respondido há 6 meses
profile picture
ESPECIALISTA
avaliado há 6 meses
profile pictureAWS
ESPECIALISTA
avaliado há 6 meses
1

Once the private subnet have a default route to the Internet Gateway, the subnet will become a Public subnet under AWS terminology for Subnets. The other piece of this is that your container should be assigned with a Public IP for its traffic to route the internet. Thus you either assign a public IP to your containers to access the Internet directly behind the Internet Gateway or use a NAT gateway to do the translation behind the scene (Private IP <> Public IP) in case your containers are only assigned with Private IP.

profile pictureAWS
AmerO
respondido há 6 meses
profile picture
ESPECIALISTA
avaliado há um mês

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas