cdk-rds-sql v8.0.11 is a CDK construct library for creating databases, schemas, roles, and users on Aurora Serverless v2, RDS clusters/instances, and AWS DSQL clusters. It supports PostgreSQL, MySQL/MariaDB, and DSQL. The construct automatically generates Lambda functions in your VPC to execute SQL statements, handling secret rotation and IAM authentication. It is designed for enterprise use, working in isolated subnets with VPC endpoints. Unlike raw custom resources, it provides typed CDK constructs (Provider, Role, Database, Schema) and integrates with aws-cdk-lib v2.214+. Release cadence follows semantic-release with Angular commit conventions.
npm install cdk-rds-sqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an Aurora Serverless PostgreSQL cluster, a Provider (Lambda), a database, and a role (user) inside it using CDK.
Upgrade CDK to v2 and use cdk-rds-sql >=7.0.0.
Ensure VPC endpoints (com.amazonaws.region.secretsmanager, com.amazonaws.region.kms) are set up in the VPC.
Use 'cluster' (same name) but check for deprecation warnings; future versions may require a different property.
Use rds.ServerlessCluster with engine AURORA_POSTGRESQL or AURORA_MYSQL.
Add iam:CreateServiceLinkedRole and appropriate RDS IAM auth actions to the Provider Lambda's role.
Run 'npm install cdk-rds-sql' and use import { Provider } from 'cdk-rds-sql'.Add 'secret: cluster.secret' to the Provider props.
Specify vpcSubnets: { subnetType: ec2.SubnetType.PRIVATE_WITH_EGRESS } if needed.Add a Secrets Manager VPC endpoint and ensure the Lambda has secretsmanager:GetSecretValue permission.