-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(rds): Support Aurora I/O Optimized for Aurora database. #25704
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zishanwang1992 thanks for the PR! Just 1 minor comment.
* | ||
* @default: `aurora` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) | ||
*/ | ||
readonly storageType?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you change this into an enum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good suggestion. I originally used enum, but run into issue because the CloudFormation defines it as string.
Now I have better understanding, I can define it as enum and convert it to string when used. Let me work on this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corymhall Could you help review the updated version? I have changed this to enum.
0e825d5
to
f241877
Compare
vpcSubnets: { subnetType: ec2.SubnetType.PUBLIC }, | ||
vpc, | ||
}, | ||
storageType: 'aurora-iopt1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update this to use the enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will address this.
/** | ||
* Storage type for Multi-AZ DB clusters. | ||
*/ | ||
IO1 = 'io1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can remove io1
since the DatebaseCluster
only supports aurora.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I will remove this.
@@ -498,6 +527,7 @@ abstract class DatabaseClusterNew extends DatabaseClusterBase { | |||
deletionProtection: defaultDeletionProtection(props.deletionProtection, props.removalPolicy), | |||
enableIamDatabaseAuthentication: props.iamAuthentication, | |||
networkType: props.networkType, | |||
storageType: props.storageType?.toString(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens when you just leave this as storageType: props.storageType
? You shouldn't need to do toString()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will have a warning for "identifier expected". Here is another code with similar implementation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corymhall I have updated the code. Please help review.
eaf6f8a
to
a4d5b3a
Compare
* The storage type to be associated with the DB cluster. | ||
* Valid values: `aurora` , `aurora-iopt1` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) | ||
* | ||
* @default: `aurora` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @default: `aurora` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) | |
* @default: DBClusterStorageType.AURORA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -276,6 +276,14 @@ interface DatabaseClusterBaseProps { | |||
*/ | |||
readonly storageEncryptionKey?: kms.IKey; | |||
|
|||
/** | |||
* The storage type to be associated with the DB cluster. | |||
* Valid values: `aurora` , `aurora-iopt1` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Valid values: `aurora` , `aurora-iopt1` (Aurora DB clusters); `io1` (Multi-AZ DB clusters) |
The valid values will come from the enum.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated
@@ -28,6 +28,22 @@ const cluster = new rds.DatabaseCluster(this, 'Database', { | |||
}); | |||
``` | |||
|
|||
To adopt Aurora I/O-Optimized. Speicify `aurora-iopt1` on the `storageType` property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To adopt Aurora I/O-Optimized. Speicify `aurora-iopt1` on the `storageType` property. | |
To adopt Aurora I/O-Optimized. Speicify `DBClusterStorageType.AURORA_IOPT1` on the `storageType` property. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@corymhall Updated. Please help review.
d443569
to
462d312
Compare
462d312
to
06f49a9
Compare
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Closes #25629
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license