- Newest
- Most votes
- Most comments
Hello.
Even if your VPC is in a different region, you should be able to use TransitGateway for public communication using NAT Gateway.
Is the default route (0.0.0.0/0) added to the route table connected to the TransitGateway attachment?
- Ireland VPC
| CIDR | Target |
|---|---|
| 0.0.0.0/0 | TransitGateway attachment |
| Paris VPC CIDR | TransitGateway attachment |
| VPC CIDR | Local |
- Paris VPC
Private Subnet
| CIDR | Target |
|---|---|
| 0.0.0.0/0 | NAT Gateway |
| Ireland VPC CIDR | TransitGateway attachment |
| VPC CIDR | Local |
Public Subnet
Communication to TransitGateway is also required to enable return communication to the route table of the public subnet where the NAT Gateway is located.
| CIDR | Target |
|---|---|
| 0.0.0.0/0 | Internet Gateway |
| Ireland VPC CIDR | TransitGateway attachment |
| VPC CIDR | Local |
While you can do this I would argue that you will incur additional cost and network latency by sending the traffic to another region to egress to the internet. Of course, having a second NAT Gateway also incurs cost so I can understand why you might do this; but in general we try to discourage customers from building inter-region dependencies - if there is some sort of failure it is good to keep your applications that are running in different regions independent of each other.
Hi,
You have a very close to what you're willing to achieve in this fully detailled example: https://docs.aws.amazon.com/vpc/latest/tgw/transit-gateway-nat-igw.html
Best,
Didier
Thank you for your responses. I have already had the opportunity to review these links, and I will look at them again. I will keep you updated. To answer you, Brettski-AWS, as mentioned earlier, the issue is due to the need to maintain the same public IP address through the NAT Gateway.
answered 2 years ago
Great, it works now! The issue was the missing route on the public subnet with the Ireland VPC CIDR. That makes sense, thank you!
answered 2 years ago
Relevant content
asked a year ago
asked 3 years ago

I think this blog will be helpful. https://dev.to/hugothomaz/centralizing-internet-output-in-multiple-aws-accounts-with-the-aws-transit-gateway-1ad5