1 Answer
- Newest
- Most votes
- Most comments
1
Your ECS Fargate task needs to be attached to a subnet which has a default route to a NAT Gateway.
Then traffic from NAT gateway needs to route to an internet gateway.
Internet gateways only work when resources have public IP addresses and an RFC1918 IP addresses routing will be dropped on the internet.
I have also used MongoDB atlas before which offers connection via VPC peering and private link. That may also be another means to explore long term than over the internet.
Relevant content
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago
The main idea is that IGW does not work without public IP. I am wondering why. For example, our computers work well inside nested network topologies with routing and gateways without any static IPs.
Because you will at some point have a NAT ip address. This could be an edge firewall/router or a proxy server.
These devices will hide your private IP addresss.
Think of a IGW as a router. Nothing more. You need a public IP address to route across the internet.
I agree every internet provider has at least one public IP. So it does not work without public IP. Routing to IGW it is just a try to get closer to the gates. Thank you.
Any issues or questions please reach out again