-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational Databaseeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1
Description
Describe the feature
Please like the original post instead of leaving a +1 comment.
Add CDK support for aurora serverless v2 ideally via the ServerlessCluster construct.
edit there's a few solutions using base cloud formation constructs in the comments. Please see those for a work around.
Currently deploying a Serverless V2 instance via cdk doesn't seem possible.
I've got this far
enum ServerlessInstanceType {
SERVERLESS = 'serverless',
}
type CustomInstanceType = ServerlessInstanceType | ec2.InstanceType;
const CustomInstanceType = {
...ServerlessInstanceType,
...ec2.InstanceType,
};
this.serverlessCluster = new DatabaseCluster(
this,
'ServerlessClusterV2',
{
engine: DatabaseClusterEngine.auroraMysql({
version: AuroraMysqlEngineVersion.of(
'8.0.mysql_aurora.3.02.0'
), // The new minor version of Database Engine.
}),
storageEncrypted: true,
iamAuthentication: true,
parameterGroup: ParameterGroup.fromParameterGroupName(
this,
'rdsClusterPrameterGroup',
'default.aurora-mysql8.0'
),
storageEncryptionKey: new Key(this, 'dbEncryptionKey'),
instanceProps: {
instanceType:
CustomInstanceType.SERVERLESS as unknown as InstanceType,
vpc: props.vpc,
vpcSubnets: {
subnetType: SubnetType.PRIVATE_ISOLATED,
},
},
}
);
but I keep running into this error
Set the Serverless v2 scaling configuration on the parent DB cluster before creating a Serverless v2 DB instance.
Which I can't figure out a way around.
Use Case
Need to create a DB via CDK. I want to use Serverless V2 because of the support for mysql 8.0.
Proposed Solution
No response
Other Information
No response
Acknowledgements
- I may be able to implement this feature request
- This feature might incur a breaking change
CDK version used
2.15.0
Environment details (OS name and version, etc.)
mac OS X
varju, adamjq, jonathannen, Anonyfox, jvlch and 714 moreezjong, salmankhalid-plt, joswayski, leegilmorecode, JCDubs and 20 morecseickel, salmankhalid-plt, joswayski, leegilmorecode, JCDubs and 10 moresalmankhalid-plt, leegilmorecode, JCDubs, vumdao, BwL1289 and 10 more
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-rdsRelated to Amazon Relational DatabaseRelated to Amazon Relational Databaseeffort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.in-progressThis issue is being actively worked on.This issue is being actively worked on.p1