-
Notifications
You must be signed in to change notification settings - Fork 4k
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): limitless database cluster #32151
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.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request
. Additionally, if clarification is needed add Clarification Request
to a comment.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #32151 +/- ##
==========================================
+ Coverage 78.66% 78.67% +0.01%
==========================================
Files 107 107
Lines 7237 7237
Branches 1329 1329
==========================================
+ Hits 5693 5694 +1
+ Misses 1358 1357 -1
Partials 186 186
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…2157) ### Issue # (if applicable) None ### Reason for this change AWS RDS now supports the configuration of advanced monitoring at the cluster level. <https://aws.amazon.com/about-aws/whats-new/2024/09/amazon-rds-performance-insights-supports-aurora-cluster-level-configuration/?nc1=h_ls> This feature is essential for creating limitless database cluster. (#32151) ### Description of changes I added `enableClusterLevelEnhancedMonitoring` prop to `ClusterProps`. If this prop enabled, `monitoringInterval` and `monitoringRole` is applied to not the instances but the cluster. Enhanced monitoring configuration for the cluster and instances has some restrictions. - When setting the `monitoringRoleArn` for both the cluster and instances, the values must be identical. - When setting the `monitoringInterval` for both the cluster and instances, the values must be identical. - When the `monitoringInterval` or `monitoringRoleArn` is set at the cluster level, enhanced monitoring will be enabled even if the same values are not specified for the instances. Based on the above, I decided to add a flag (`enableClusterLevelEnhancedMonitoring`) to switch the application of `monitoringInterval` and `monitoringRole` between the instance level and the cluster level to avoid breaking changes to the existing props. #### Verification Results Memo The value of the Enhanced Monitoring configuration must be the same for both the cluster level and the instance level. ```ts "DatabaseB269D8BB": { "Type": "AWS::RDS::DBCluster", "Properties": { ..., "Engine": "aurora-postgresql", "EngineVersion": "16.1", "MonitoringInterval": 5, "MonitoringRoleArn": { "Fn::GetAtt": [ "DatabaseMonitoringRoleForCluster91F5067E", "Arn" ] }, }, "DatabasewriterInstanceEBFCC003": { "Type": "AWS::RDS::DBInstance", "Properties": { ..., "DBClusterIdentifier": { "Ref": "DatabaseB269D8BB" }, "Engine": "aurora-postgresql", "MonitoringInterval": 1, "MonitoringRoleArn": { "Fn::GetAtt": [ "DatabaseMonitoringRole576991DA", "Arn" ] }, } ``` ```sh | Database/writerInstance (DatabasewriterInstanceEBFCC003) Resource handler returned message: "MonitoringInterval conflicts with cluster level parameter. (Service: Rds, Status Code: 400, Request ID: 7c9d9023-fe2a-4b39-a939-22cec3595041)" (RequestToken: bc3e18eb-2daa-4f25-c205-11f1ec70fc15, HandlerErrorCode: InvalidRequest) ``` The monitoring role arn must be the same for both cluster and instance level. ```yaml "DatabaseB269D8BB": { "Type": "AWS::RDS::DBCluster", "Properties": { ..., "Engine": "aurora-postgresql", "EngineVersion": "16.1", "MonitoringInterval": 5, "MonitoringRoleArn": { "Fn::GetAtt": [ "DatabaseMonitoringRoleForCluster91F5067E", "Arn" ] }, }, "DatabasewriterInstanceEBFCC003": { "Type": "AWS::RDS::DBInstance", "Properties": { ..., "DBClusterIdentifier": { "Ref": "DatabaseB269D8BB" }, "Engine": "aurora-postgresql", "MonitoringInterval": 5, "MonitoringRoleArn": { "Fn::GetAtt": [ "DatabaseMonitoringRole576991DA", "Arn" ] }, } ``` ```sh Resource handler returned message: "MonitoringRoleArn conflicts with cluster level parameter. (Service: Rds, Status Code: 400, Request ID: 761a867d-409e-4208-a08e-5591607d0ed0)" (RequestToken: fb691324-f37c-405d-e5bd-447911f7664f, HandlerErrorCode: InvalidRequest) ``` ### Description of how you validated changes Add both unit and integ tests ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
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.
Thank you for the contribution.
Just one minor comment.
Co-authored-by: Matsuda <[email protected]>
@mazyu36 Thank you for your review! I've updated my code. |
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.
Thank you for the fix! I'm looking forward to seeing this PR get merged.
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.
LGTM, thank you for contributing!
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). |
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). |
@Mergifyio update |
☑️ Nothing to do
|
@GavinZZ Thank you for your approval. It seems that codecov job has failed but I don't know how to resolve it. Could you please provide me with the solution? |
@Mergifyio update |
✅ Branch has been successfully updated |
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). |
Comments on closed issues and PRs are hard for our team to see. |
Issue # (if applicable)
None
Reason for this change
Amazon Aurora has released Postgres Limitless Database and AWS CDK does not support it.
https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/limitless.html
Description of changes
clusterScailabilityType
prop toclusterProps
Description of how you validated changes
Add both unit and integ tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license