RDS PrivateLink Construct for AWS CDK
Features
- Creates a VPC Endpoint for PrivateLink with RDS using a network load balancer to front the connection to RDS
- Supports tagging the VPC Endpoint that is created through a custom resource
API Doc
See API
References
Example
const vpc = new ec2.Vpc(stack, 'VPC');
const db = new rds.DatabaseInstance(stack, 'DB', {
engine: rds.DatabaseInstanceEngine.SQL_SERVER_SE,
vpc,
});
new rdsPrivateLink.RdsPrivateLink(stack, 'privateLink', {
db,
vpc,
dbPort: rdsPrivateLink.CommonDBPorts.MSSQL,
vpcSubnets: {
subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS,
},
});