How to use @aws-cdk/aws-rds - 4 common examples

To help you get started, we’ve selected a few @aws-cdk/aws-rds examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github customink / activerecord-aurora-serverless-adapter / test / aurora-serverless / lib / aurora-serverless-stack.ts View on Github external
);
    dbParamGroup.addDependsOn(dbSubnetGroup);

    // AURORA SERVERLESS CLUSTERS

    const aurora = new CfnDBCluster(
      this,
      "AuroraServerless",
      auroraProps(
        DB_NAME,
        DB_CLUSTER_ID,
        dbSubnetGroup.dbSubnetGroupName,
        dbParamGroup
      )
    );
    const aurora2 = new CfnDBCluster(
      this,
      "AuroraServerless2",
      auroraProps(
        `${DB_NAME}2`,
        `${DB_CLUSTER_ID}2`,
        dbSubnetGroup.dbSubnetGroupName,
        dbParamGroup
      )
    );
    aurora.addDependsOn(dbParamGroup);
    aurora2.addDependsOn(dbParamGroup);
    new CfnOutput(this, "AASAResourceArn", {
      value: `arn:aws:rds:${this.region}:${this.account}:cluster:${DB_CLUSTER_ID}`
    });
    new CfnOutput(this, "AASAResourceArn2", {
      value: `arn:aws:rds:${this.region}:${this.account}:cluster:${DB_CLUSTER_ID}2`
github customink / activerecord-aurora-serverless-adapter / test / aurora-serverless / lib / aurora-serverless-stack.ts View on Github external
innodb_file_format: "Barracuda",
          character_set_client: "utf8mb4",
          character_set_connection: "utf8mb4",
          character_set_database: "utf8mb4",
          character_set_results: "utf8mb4",
          character_set_server: "utf8mb4",
          collation_server: "utf8mb4_unicode_ci",
          collation_connection: "utf8mb4_unicode_ci"
        }
      }
    );
    dbParamGroup.addDependsOn(dbSubnetGroup);

    // AURORA SERVERLESS CLUSTERS

    const aurora = new CfnDBCluster(
      this,
      "AuroraServerless",
      auroraProps(
        DB_NAME,
        DB_CLUSTER_ID,
        dbSubnetGroup.dbSubnetGroupName,
        dbParamGroup
      )
    );
    const aurora2 = new CfnDBCluster(
      this,
      "AuroraServerless2",
      auroraProps(
        `${DB_NAME}2`,
        `${DB_CLUSTER_ID}2`,
        dbSubnetGroup.dbSubnetGroupName,
github customink / activerecord-aurora-serverless-adapter / test / aurora-serverless / lib / aurora-serverless-stack.ts View on Github external
// SUBNET GROUP

    const dbSubnetGroup: CfnDBSubnetGroup = new CfnDBSubnetGroup(
      this,
      "AuroraSubnetGroup",
      {
        dbSubnetGroupDescription: "Subnet group to AASA Aurora",
        dbSubnetGroupName: "aasa-subnet-group",
        subnetIds
      }
    );

    // RDS PARAMETER GROUP

    const dbParamGroup = new CfnDBClusterParameterGroup(
      this,
      "ParameterGroup",
      {
        family: "aurora5.6",
        description: "Test customink/activerecord-aurora-serverless-adapter.",
        parameters: {
          innodb_large_prefix: "1",
          innodb_file_per_table: "1",
          innodb_file_format: "Barracuda",
          character_set_client: "utf8mb4",
          character_set_connection: "utf8mb4",
          character_set_database: "utf8mb4",
          character_set_results: "utf8mb4",
          character_set_server: "utf8mb4",
          collation_server: "utf8mb4_unicode_ci",
          collation_connection: "utf8mb4_unicode_ci"
github customink / activerecord-aurora-serverless-adapter / test / aurora-serverless / lib / aurora-serverless-stack.ts View on Github external
const vpc = new Vpc(this, "Vpc", {
      cidr: "10.0.0.0/16",
      natGateways: 0,
      subnetConfiguration: [
        { name: "aasa_isolated", subnetType: SubnetType.ISOLATED }
      ]
    });
    const subnetIds: string[] = [];
    vpc.isolatedSubnets.forEach(subnet => {
      subnetIds.push(subnet.subnetId);
    });

    // SUBNET GROUP

    const dbSubnetGroup: CfnDBSubnetGroup = new CfnDBSubnetGroup(
      this,
      "AuroraSubnetGroup",
      {
        dbSubnetGroupDescription: "Subnet group to AASA Aurora",
        dbSubnetGroupName: "aasa-subnet-group",
        subnetIds
      }
    );

    // RDS PARAMETER GROUP

    const dbParamGroup = new CfnDBClusterParameterGroup(
      this,
      "ParameterGroup",
      {
        family: "aurora5.6",

@aws-cdk/aws-rds

The CDK Construct Library for AWS::RDS

Apache-2.0
Latest version published 7 days ago

Package Health Score

98 / 100
Full package analysis