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

Cannot create Aurora serverless DB using CfnDBCluster #3608

Closed
1 of 5 tasks
realharry opened this issue Aug 9, 2019 · 2 comments
Closed
1 of 5 tasks

Cannot create Aurora serverless DB using CfnDBCluster #3608

realharry opened this issue Aug 9, 2019 · 2 comments
Labels
needs-triage This issue or PR still needs to be triaged.

Comments

@realharry
Copy link

realharry commented Aug 9, 2019

  • I'm submitting a ...

    • πŸͺ² bug report
    • πŸš€ feature request
    • πŸ“š construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a πŸͺ²bugπŸͺ²: Please provide the steps to reproduce

Call to new CfnDBCluster() with engineMode: 'serverless' fails on cdk deploy.

For example, here's an example code:

    const cluster = new rds.CfnDBCluster(this, dbId, {
      dbClusterIdentifier: dbId,
      databaseName: 'main-db',
      engine: 'aurora',
      engineMode: 'serverless',
      port: 5432,
      masterUsername: 'postgres',
      masterUserPassword: 'postgres',
      scalingConfiguration: {
        minCapacity: 2,
        maxCapacity: 32,
        autoPause: false,
      },
      dbSubnetGroupName: sgName,

(I tried various different combinations of engines (e.g., aurora vs aurora-postgresql) and engVersions, and paramGroupNames, etc. with consistent results. It fails to deploy.)

The error I get:

 0/3 | 3:54:12 PM | CREATE_IN_PROGRESS   | AWS::RDS::DBCluster | main-db-staging (maindbstaging)
 1/3 | 3:54:13 PM | CREATE_FAILED        | AWS::RDS::DBCluster | main-db-staging (maindbstaging) The engine mode serverless you requested is currently unavailable. (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 7c9e3e42-849f-451a-9da7-91d9f8899e8e)
	Rbi2RdsStack.createAuroraServerless (/Users/harry/Projects/devops/deploy/rbi2-rds/lib/rbi2-rds-stack.ts:43:21)
	\_ Rbi2RdsStack.init (/Users/harry/Projects/devops/deploy/rbi2-rds/lib/rbi2-rds-stack.ts:39:25)
	\_ new Rbi2RdsStack (/Users/harry/Projects/devops/deploy/rbi2-rds/lib/rbi2-rds-stack.ts:34:10)
	\_ Object.<anonymous> (/Users/harry/Projects/devops/deploy/rbi2-rds/bin/rbi2-rds.ts:13:1)
	\_ Module._compile (internal/modules/cjs/loader.js:701:30)
	\_ Module.m._compile (/Users/harry/Projects/devops/deploy/rbi2-rds/node_modules/ts-node/src/index.ts:473:23)
	\_ Module._extensions..js (internal/modules/cjs/loader.js:712:10)
	\_ Object.require.extensions.(anonymous function) [as .ts] (/Users/harry/Projects/devops/deploy/rbi2-rds/node_modules/ts-node/src/index.ts:476:12)
	\_ Module.load (internal/modules/cjs/loader.js:600:32)
	\_ tryModuleLoad (internal/modules/cjs/loader.js:539:12)
	\_ Function.Module._load (internal/modules/cjs/loader.js:531:3)
	\_ Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
	\_ Object.<anonymous> (/Users/harry/Projects/devops/deploy/rbi2-rds/node_modules/ts-node/src/bin.ts:158:12)
	\_ Module._compile (internal/modules/cjs/loader.js:701:30)
	\_ Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
	\_ Module.load (internal/modules/cjs/loader.js:600:32)
	\_ tryModuleLoad (internal/modules/cjs/loader.js:539:12)
	\_ Function.Module._load (internal/modules/cjs/loader.js:531:3)
	\_ Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
	\_ findNodeScript.then.existing (/usr/local/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
  • What is the expected behavior (or behavior of feature suggested)?

Anything that can be created via CloudFormation should be create-able using CDK, even with low level CFN constructs.

  • What is the motivation / use case for changing the behavior or adding this feature?

Documentation does not explicitly mention that aurora serverless cannot be created via CDK.
https://docs.aws.amazon.com/cdk/api/latest/docs/@aws-cdk_aws-rds.CfnDBCluster.html

Likewise, CloudFormation doc does not state that it cannot create aurora serverless.

  • Please tell us about your environment:

    • CDK CLI Version: 1.3.0 (build bba9914)
    • Module Version: 1.3.0
    • OS: OSX Mojave
    • Language: TypeScript
  • Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. associated pull-request, stackoverflow, gitter, etc)

This is related to #929, which requests for a way to create Aurora Serverless using high-level RDS constructs.

Note: I tried it on various regions including us-west-1 and us-west-2 with the same results.

@realharry realharry added the needs-triage This issue or PR still needs to be triaged. label Aug 9, 2019
@ApocDev
Copy link

ApocDev commented Aug 10, 2019

Serverless can be created with the cdk. See #929 (comment)

Use the following:
Engine: aurora
Mode: serverless
EngineVersion: 2.3

MinCapacity: 8 (required min)

When in doubt, always check the aws cli docs to see what valid values are. https://docs.aws.amazon.com/AmazonRDS/latest/AuroraUserGuide/aurora-serverless.create.html

@realharry
Copy link
Author

Thanks, @ApocDev Yes, I think I had some mixups with regions and/or other params. I was finally able to deploy it on us-west-2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants