Skip to content
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

rds: Add support for MariaDB RDS Proxy #29402

Closed
mavdi opened this issue Mar 7, 2024 · 8 comments · Fixed by #29404 or #29412 · May be fixed by NOUIY/aws-solutions-constructs#98 or NOUIY/aws-solutions-constructs#99
Closed

rds: Add support for MariaDB RDS Proxy #29402

mavdi opened this issue Mar 7, 2024 · 8 comments · Fixed by #29404 or #29412 · May be fixed by NOUIY/aws-solutions-constructs#98 or NOUIY/aws-solutions-constructs#99
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. effort/medium Medium work item – several days of effort p2

Comments

@mavdi
Copy link

mavdi commented Mar 7, 2024

Describe the bug

Even though MariaDB support has been added to RDS Proxies, this is not reflected in CDK.

Expected Behavior

Given that MariaDB is supported in RDS Proxies, I'd like this to work.

https://aws.amazon.com/about-aws/whats-new/2022/07/amazon-rds-proxy-mariadb-version-10-support/

Current Behavior

Throws an error saying MariaDB support for proxies is not supported.

Error: Engine 'mariadb-10.6.16' does not support proxies
    at ProxyTarget.bind (/home/parallels/Documents/work/call4u-monorepo/infrastructure/node_modules/aws-cdk-lib/aws-rds/lib/proxy.js:1:2928)

Reproduction Steps

/ Create the RDS Proxy
    const rdsProxy = new aws_rds.DatabaseProxy(this, `${stackNamePrefix}-DatabaseProxy`, {
      proxyTarget: aws_rds.ProxyTarget.fromInstance(databaseInstance),
      secrets: [databaseSecret],
      vpc,
      securityGroups: [rdsProxySecurityGroup],
      requireTLS: false, // Optional: set to true to enforce TLS connections
    });

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.131.0 (build 92b912d)

Framework Version

No response

Node.js Version

21.6.2

OS

Mac OS

Language

TypeScript

Language Version

No response

Other information

No response

@mavdi mavdi added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Mar 7, 2024
@github-actions github-actions bot added the @aws-cdk/aws-rds Related to Amazon Relational Database label Mar 7, 2024
@msambol
Copy link
Contributor

msambol commented Mar 7, 2024

I'll take this.

@msambol
Copy link
Contributor

msambol commented Mar 7, 2024

@mavdi Did you specify an engine family when creating databaseInstance ? Can I see the code for that ?

@pahud
Copy link
Contributor

pahud commented Mar 7, 2024

@msambol Yap I was just about to ask exactly the same question :-)

@pahud pahud added p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 7, 2024
@mavdi
Copy link
Author

mavdi commented Mar 8, 2024

Yes I did, see below:

    const databaseInstance = new aws_rds.DatabaseInstance(
      this,
      `${stackNamePrefix}-DatabaseInstance`,
      {
        securityGroups: [databaseSecurityGroup],
        engine: aws_rds.DatabaseInstanceEngine.mariaDb({
          version: aws_rds.MariaDbEngineVersion.VER_10_6_16,
        }),
        instanceType: aws_ec2.InstanceType.of(
          aws_ec2.InstanceClass.T3,
          aws_ec2.InstanceSize.MICRO
        ),
        vpc,
        vpcSubnets: {
          subnetType: aws_ec2.SubnetType.PUBLIC,
        },
        credentials: aws_rds.Credentials.fromSecret(databaseSecret),
        removalPolicy,
        publiclyAccessible: true,
        databaseName: "db",
        deletionProtection: false,
      }
    );

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Mar 8, 2024
@msambol
Copy link
Contributor

msambol commented Mar 8, 2024

@mavdi / @pahud Looks like my PR is getting merged but I have a better fix coming for this. I'll open a new PR.

@mergify mergify bot closed this as completed in #29404 Mar 8, 2024
mergify bot pushed a commit that referenced this issue Mar 8, 2024
Closes #29402.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy link

github-actions bot commented Mar 8, 2024

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@msambol
Copy link
Contributor

msambol commented Mar 8, 2024

@pahud Can you reopen this please?

@msambol
Copy link
Contributor

msambol commented Mar 8, 2024

@pahud This is a better fix: #29412. MariaDB needed the engine family added.

mergify bot pushed a commit that referenced this issue Mar 14, 2024
MariaDB is grouped with MySQL, hence adding `MYSQL` as the engine family for MariaDB.

<img width="749" alt="Screenshot 2024-03-08 at 12 02 36 PM" src="https://github.com/aws/aws-cdk/assets/3310356/382d5561-6115-4bc1-a7e7-fb4deda57c73">


Closes #29402.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-rds Related to Amazon Relational Database bug This issue is a bug. effort/medium Medium work item – several days of effort p2
Projects
None yet
3 participants