DBSubnetGroup
Source:
src/AWS/RDS/DBSubnetGroup.ts
An RDS DB subnet group for Aurora clusters, instances, and proxies.
RDS requires a subnet group spanning at least two Availability Zones before a cluster or instance can be placed in a VPC. Changing the name replaces the group; the subnet list updates in place.
Creating a Subnet Group
Section titled “Creating a Subnet Group”Subnet Group Across Two AZs
const subnetGroup = yield* DBSubnetGroup("SubnetGroup", { subnetIds: [privateSubnetA.subnetId, privateSubnetB.subnetId],});Place an Aurora Cluster in the Group
const cluster = yield* DBCluster("Cluster", { engine: "aurora-postgresql", dbSubnetGroupName: subnetGroup.dbSubnetGroupName, vpcSecurityGroupIds: [dbSecurityGroup.groupId],});