-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Open
Labels
@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudRelated to Amazon Elastic Compute Cloudeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2
Description
Describe the feature
Add support for regional NAT gateways to the VPC construct
https://aws.amazon.com/blogs/networking-and-content-delivery/introducing-amazon-vpc-regional-nat-gateway/
https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-ec2-natgateway.html
Use Case
Simpler setup than zonal gateways
Proposed Solution
maybe simple a natGatewayType property for the VPC construct?
Other Information
You can workaround it for now by doing this
const vpc = new ec2.Vpc(this, 'Vpc', {
vpcName: 'foobar',
maxAzs: 3,
natGateways: 1, // Using regional so we only need one
],
});
this.vpc = vpc;
// FIXME: undo this once it is supported by CDK
vpc.node.findAll().forEach((child) => {
if (child instanceof ec2.CfnNatGateway) {
child.addPropertyOverride('AvailabilityMode', 'regional');
child.addPropertyOverride('VpcId', vpc.vpcId);
child.addPropertyDeletionOverride('SubnetId');
}
});Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
AWS CDK Library version (aws-cdk-lib)
AWS CDK CLI version
2.1033.0 (build 1ec3310)
Environment details (OS name and version, etc.)
Ubuntu 25.04
idm-ryou, madpcompany, zhang-hang-valuesccg and tfentonz
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudRelated to Amazon Elastic Compute Cloudeffort/mediumMedium work item – several days of effortMedium work item – several days of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p2