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?

2回答
1
承認された回答

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
エキスパート
回答済み 6ヶ月前
profile picture
エキスパート
レビュー済み 6ヶ月前
profile pictureAWS
エキスパート
レビュー済み 6ヶ月前
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
回答済み 6ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ