RDS Serverless V2 via CDK #20126
-
Hi Team, Could someone please guide me creating Serverless V2 Via cdk. I tried to create with ServerlessCluster CDK, Its throwing error because V2 needs a clsuter and instance separately. Tried with below CDK code: const databaseCluster = new rds.DatabaseCluster(this, 'DatabaseCluster', {
clusterIdentifier: `test-db-cluster`,
engine: rds.DatabaseClusterEngine.auroraPostgres({
version: AuroraPostgresEngineVersion.VER_13_6
}),
parameterGroup: rds.ParameterGroup.fromParameterGroupName(
this,
'parametergroup',
'default.aurora-postgresql13',
),
credentials: rds.Credentials.fromSecret(secret),
instanceProps: {
instanceType: new InstanceType('serverless'),
//instanceType: ec2.InstanceType.of(ec2.InstanceClass.BURSTABLE2, ec2.InstanceSize.SMALL),
vpc,
vpcSubnets: {
subnets: [
ec2.Subnet.fromSubnetAttributes(this, 'db-subnet1', {
subnetId: config.subnetIds[0],
availabilityZone: config.availabilityZones[0],
}),
ec2.Subnet.fromSubnetAttributes(this, 'db-subnet2', {
subnetId: config.subnetIds[1],
availabilityZone: config.availabilityZones[1],
}),
],
},
securityGroups: [securityGroup],
},
}); But this did not help, giving the below error:
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
What part is the RDS Aurora v2 difference in the code above? It looks exactly like a v1 Aurora Cluster to me. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
You probably need to change it somehow to make it trigger again (since CloudFormation saw no changes to the resource, it didn't invoke your handler again).