amazon-web-servicesamazon-rdsaws-cdkaws-certificate-manager

Using AWS CDK and RDS (Aurora), where can I change the Certificate authority?


I am setting up a database cluster (Aurora MySQL 5.7) using the DatabaseCluster Construct from @aws-cdk/aws-rds.

My question, where in the setup can I change the Certificate authority? I want to programmatically setup the database to use rds-ca-2019 instead of rds-ca-2015. Note, I want to change this using CDK, not by "clicking in the AWS GUI".

The image below shows which setting I am referring to.

Image showing the setting I am trying to change

I have been browsing the docs for RDS CDK, and tried to Google this without success.

BTW, my current current config looks a bit like this:

const cluster = new rds.DatabaseCluster(this, 'aurora-cluster', {
    clusterIdentifier: 'aurora-cluster',
    engine: rds.DatabaseClusterEngine.AURORA_MYSQL,
    masterUser: {
        username: 'someuser',
        password: 'somepassword'
    },
    defaultDatabaseName: 'db',
    instances: 2,
    instanceIdentifierBase: 'aurora-',
    instanceProps: {
        instanceType: ...,
        vpcSubnets: {
            subnetType: ec2.SubnetType.PUBLIC,
        },
        vpc: myVpc
    },
    removalPolicy: cdk.RemovalPolicy.DESTROY,
    parameterGroup: {
        parameterGroupName: 'default.aurora-mysql5.7'
    },
    port: 3306,
    storageEncrypted: true
});

Solution

  • Apparently Cloudformation doesn't support the certificate authority field, and therefore CDK can't either.

    https://github.com/aws-cloudformation/aws-cloudformation-coverage-roadmap/issues/211

    I upvoted the issue; feel free to join me!