-
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): support for local write forwarding in an Aurora Mysql cluster #31524
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.
Thanks for the PR. I made one very minor comment.
(And below is just my note)
I ran CFn to see if CFn really throws when enableLocalWriteForwarding
is false and engine type is not mysql. Then I got an error even though it was false. In other words, the validation was correct :)
if (props.enableLocalWriteForwarding !== undefined && !['aurora', 'aurora-mysql'].includes(props.engine.engineType)) {
throw new Error(`\'enableLocalWriteForwarding\' is only supported for Aurora Mysql cluster engine type, got: ${props.engine.engineType}`);
}
@go-to-k Thank you for your review!
This result was also something I did not anticipate. The validation using I added a case to the unit test to verify that an error occurs even when false is passed! |
It might be good to add a code comment at the conditional branch that says that a CFn error will occur not only when the property is true but also when false, if the engine type is not mysql. Otherwise developers might get confused. |
@go-to-k I have updated the description! |
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!
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.
Thanks for your contribution!
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)
Closes #31523 .
Reason for this change
Cloudformation supports enabling local write forwarding feature but AWS CDK does not support it.
Description of changes
enableLocalWriteForwarding
toDatabaseClusterBaseProps
engineType
is eitheraurora
oraurora-mysql
engineType
set toaurora
means launching a MySQL-compatible Aurora cluster.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