Closed zmgehlke closed 1 month ago
Hey @zmgehlke , thanks for reaching out. Looks like you faced this issue in the latest version.Could you please mention in which CDK version you found it to be correctly working ?
Hi @khushail -- I appreciate your effort investigating this issue, but unfortunately it's been a few years since I've used the RDS construct (since circa 2022) and I no longer know which specific version I was using.
I'm not actually convinced that I'm reporting the correct error, eg if I switch the definition:
serverlessV2MaxCapacity: 2,
serverlessV2MinCapacity: 0.5,
vpc: props.vpc,
vpcSubnets: subnetGroup,
...then I get a new error where it apparently cannot find the correct subnet entities. My larger complaint is that no variety of options appears to work in even this relatively basic case to accomplish a relatively simple goal -- deploying severless RDS into a VPC.
Hi @zmgehlke , Looks like your issue is quite similar to this one - https://github.com/aws/aws-cdk/issues/29256
The sample code shared here might be what you are looking for- https://github.com/aws/aws-cdk/issues/29256#issuecomment-1965551293
const cluster = new rds.DatabaseCluster(this, 'Database', {
engine: rds.DatabaseClusterEngine.auroraMysql({
version: rds.AuroraMysqlEngineVersion.VER_3_05_2,
}),
storageEncrypted: true,
vpcSubnets: {
subnetType: ec2.SubnetType.PRIVATE_ISOLATED,
},
writer: rds.ClusterInstance.provisioned('instance1', {
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.LARGE),
publiclyAccessible: false,
}),
readers: [rds.ClusterInstance.provisioned('instance2', {
instanceType: ec2.InstanceType.of(ec2.InstanceClass.T3, ec2.InstanceSize.LARGE),
publiclyAccessible: false,
})],
vpc,
});
Let me know if it works for you
This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.
Comments on closed issues and PRs are hard for our team to see. If you need help, please open a new issue that references this one.
Describe the bug
I create a VPC using the CDK with isolated networks.
I then create a subnet group:
I then create an RDS cluster:
I get the following error:
I have tried numerous options on the subnet group and other definitions; no combination of features appears to work.
Expected Behavior
Create RDS serverless cluster in isolated VPC.
Current Behavior
Inscrutable error about defining VPC settings.
Reproduction Steps
See above.
Possible Solution
No response
Additional Information/Context
I'm deeply frustrated that the CDK decided to become "smart" by automating so many important features -- because you took a good product and made it impossible to use, due to the continually malfunctioning automation. RDS wasn't previously impossible to set up, due to the CDK breaking when small customizations were made.
CDK CLI Version
2.148.0
Framework Version
No response
Node.js Version
20.15.1
OS
Ubuntu 22.04
Language
TypeScript
Language Version
No response
Other information
No response