vpc: when natGateways
Inconsistent Route Table Configuration for Private Subnets in VPC with Multiple NAT Gateways
#30643
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p3
Describe the bug
When creating a VPC with multiple NAT Gateways using the AWS CDK, the automatic route table configuration for private subnets does not consistently assign routes for internet access (0.0.0.0/0) to the corresponding NAT Gateways.
Expected Behavior
All private subnets should have a route (0.0.0.0/0) pointing to their corresponding NAT Gateway
Current Behavior
Only one of the private subnets had the correct route to the NAT Gateway. The other private subnets lacked this route, causing connectivity issues.
Reproduction Steps
Define a VPC with multiple private and public subnets.
Configure the VPC to use multiple NAT Gateways (one per AZ) with property
natGateways
Deploy the stack.
Here is the relevant CDK code used to create the VPC:
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.144.0 (build 5fb15bc)
Framework Version
No response
Node.js Version
Node.js v20.14.0
OS
Linux avril 6.5.0-41-generic #41-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:55:15 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: