Aws-cdk: Cannot create Aurora Postgres Serverless Database

Created on 5 Feb 2020  路  8Comments  路  Source: aws/aws-cdk

I get the error:

The engine mode serverless you requested is currently unavailable.

Reproduction Steps

const database = new CfnDBCluster(construct, 'aurora', {
    databaseName: 'anydatabasename',
    dbClusterIdentifier: environmentPrefix(),
    engine: 'aurora-postgresql',
    engineMode: 'serverless',
    masterUsername: 'admin',
    masterUserPassword: 'admin',
    port: 5432,
    dbSubnetGroupName: subnetGroup.dbSubnetGroupName, // Created previously
    scalingConfiguration: {
        autoPause: true,
        maxCapacity: 1,
        minCapacity: 1,

        // Fifteen minutes should be enough
        secondsUntilAutoPause: 15 * 60,
    },
});

Error Log

1/2 | 5:57:39 PM | UPDATE_FAILED        | AWS::RDS::DBCluster                   | aurora The engine mode serverless you requested is currently unavailable. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 896e55ad-7f9c-4d02-a046-cfeba88e54d6)
    Object.exports.attach ([project directory]/src/aurora.ts:18:19)
    \_ new ApiService ([project directory]/src/index.ts:25:31)
    \_ Object.<anonymous> ([project directory]/src/index.ts:33:1)
    \_ Module._compile (internal/modules/cjs/loader.js:778:30)
    \_ Module.m._compile ([project directory]/node_modules/ts-node/src/index.ts:814:23)
    \_ Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    \_ Object.require.extensions.(anonymous function) [as .ts] ([project directory]/node_modules/ts-node/src/index.ts:817:12)
    \_ Module.load (internal/modules/cjs/loader.js:653:32)
    \_ tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    \_ Function.Module._load (internal/modules/cjs/loader.js:585:3)
    \_ Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    \_ main ([project directory]/node_modules/ts-node/src/bin.ts:226:14)
    \_ Object.<anonymous> ([project directory]/node_modules/ts-node/src/bin.ts:485:3)
    \_ Module._compile (internal/modules/cjs/loader.js:778:30)
    \_ Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    \_ Module.load (internal/modules/cjs/loader.js:653:32)
    \_ tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    \_ Function.Module._load (internal/modules/cjs/loader.js:585:3)
    \_ Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    \_ startup (internal/bootstrap/node.js:283:19)
    \_ bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

Environment

  • CLI Version : 1.22.0
  • Framework Version: 1.22.0
  • OS : OS X 10.15.2
  • Language : Typescript

Other

I saw #3608, but using just aurora as suggested there makes an Aurora MySQL cluster.

I also saw #218, but I think I should be able to do this with CfnDBCluster in the meantime, no?


This is :bug: Bug Report

@aws-cdaws-rds bug needs-triage

All 8 comments

The issue seems to be that I'm trying to create it in ap-southeast-2 which doesn't support Aurora Postgres Serverless yet.

Is the list of supported regions still the ones it was at launch? Could you show me where I can find that list in the docs?

@thekevinbrown - you can find the list of supported regions in this page - https://aws.amazon.com/rds/aurora/pricing/.

If you drill down under "PostgreSQL-Compatible Edition", you'll find the section 'Serverless pricing' which has a dropdown with the list of supported regions.

@thekevinbrown - you can find the list of supported regions in this page - https://aws.amazon.com/rds/aurora/pricing/.

If you drill down under "PostgreSQL-Compatible Edition", you'll find the section 'Serverless pricing' which has a dropdown with the list of supported regions.

This does not seem to be accurate:

image

Tokyo appears to be available.

Yet when I go to "Create Database" screen, the "Serverless" option is not available.

In fact, I am not seeing the entire section "Database features" when I switch to Postgres. But it is available for MySQL.

Availability of database types in specific regions belongs to the RDS service team, including this documentation.

Please contact the RDS service team via AWS support.

For anyone who gets here via Google.

You can find if the region has the serverless postgres option via the following command:

aws rds describe-db-engine-versions | jq '.DBEngineVersions[] | select(.SupportedEngineModes != null and .SupportedEngineModes[] == "serverless" and .Engine == "aurora-postgresql")'

Just make sure to run it in the region you want to check.

Hi,
Having the same issue on eu-west-1.

When I run @moltar 's suggested command on that region I get:

{
  "Engine": "aurora-postgresql",
  "EngineVersion": "10.12",
  "DBParameterGroupFamily": "aurora-postgresql10",
  "DBEngineDescription": "Aurora (PostgreSQL)",
  "DBEngineVersionDescription": "Aurora PostgreSQL (compatible with PostgreSQL 10.12)",
  "ValidUpgradeTarget": [],
  "ExportableLogTypes": [
    "postgresql"
  ],
  "SupportsLogExportsToCloudwatchLogs": true,
  "SupportsReadReplica": false,
  "SupportedEngineModes": [
    "serverless"
  ],
  "SupportedFeatureNames": [
    "s3Import",
    "Comprehend",
    "s3Export",
    "SageMaker"
  ],
  "Status": "available"

But when I try to create using this cluster definition:

    this.myPostgresInstance = new CfnDBCluster(
      this,
      `${project}-rds-${env}`,
      {
        // cannot use upper case characters.
        databaseName: this.dbName,
        dbClusterIdentifier: id,
        engine: "aurora-postgresql",
        engineMode: "serverless",
        engineVersion: "10.12",
        enableHttpEndpoint: true,
        port: 5432,
        masterUsername: databaseCredentialsSecret
          .secretValueFromJson("username")
          .toString(),
        masterUserPassword: databaseCredentialsSecret
          .secretValueFromJson("password")
          .toString(),
        dbSubnetGroupName: new CfnDBSubnetGroup(this, "db-subnet-group", {
          dbSubnetGroupDescription: `${this.dbName} database cluster subnet group`,
          subnetIds: props.vpc.selectSubnets({
            subnetGroupName: "isolatedSubnet-RDS",
          }).subnetIds,
        }).ref,
        scalingConfiguration: {
          autoPause: true,
          maxCapacity: 64,
          minCapacity: 8,
          secondsUntilAutoPause: 1000,
        },
        vpcSecurityGroupIds: [this.dbSG.securityGroupId],
      }
    );

I get the same error:

The engine mode serverless you requested is currently unavailable. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: e6f1b0a8-8915-4a20-a58b-aa18201f6f39; Proxy: null)

Any ideas why this does not work? My cluster is being created on eu-west-1

@jesper-bylund I assume your issue was solved like you mentioned in #10842?

@skinny85 yes, just forgot to remove this comment. Sorry about that, and thanks for the follow up!

Was this page helpful?
0 / 5 - 0 ratings