Aws-cdk: Support me-south-1 region (Unrecognized resource types: [AWS::CDK::Metadata])

Created on 14 Aug 2019  ·  3Comments  ·  Source: aws/aws-cdk

Note: for support questions, please first reference our documentation, then use Stackoverflow. This repository's issues are intended for feature requests and bug reports.

  • I'm submitting a ...

    • [x] :beetle: bug report
    • [ ] :rocket: feature request
    • [ ] :books: construct library gap
    • [ ] :phone: security issue or vulnerability => Please see policy
    • [ ] :question: support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a :beetle:bug:beetle:: Please provide the steps to reproduce

When trying to deploy a stack to me-south-1 (Middle East) region, CDK deployments fail with Unrecognized resource types: [AWS::CDK::Metadata] error.

❯  cdk bootstrap aws://123456789012/me-south-1
 ⏳  Bootstrapping environment aws://123456789012/me-south-1...
CDKToolkit: creating CloudFormation changeset...
 0/2 | 11:55:46 | REVIEW_IN_PROGRESS   | AWS::CloudFormation::Stack | CDKToolkit User Initiated
 0/2 | 11:55:54 | CREATE_IN_PROGRESS   | AWS::CloudFormation::Stack | CDKToolkit User Initiated
 0/2 | 11:55:57 | CREATE_IN_PROGRESS   | AWS::S3::Bucket | StagingBucket 
 0/2 | 11:55:59 | CREATE_IN_PROGRESS   | AWS::S3::Bucket | StagingBucket Resource creation Initiated
 1/2 | 11:56:19 | CREATE_COMPLETE      | AWS::S3::Bucket | StagingBucket 
 2/2 | 11:56:21 | CREATE_COMPLETE      | AWS::CloudFormation::Stack | CDKToolkit 
 ✅  Environment aws://123456789012/me-south-1 bootstrapped.

❯  aws cloudformation list-stacks
{
    "StackSummaries": [
        {
            "StackId": "arn:aws:cloudformation:eu-west-1:123456789012:stack/CDKToolkit/af1b02d0-be68-11e9-8eec-062647984902", 
            "LastUpdatedTime": "2019-08-14T07:54:10.421Z", 
            "TemplateDescription": "The CDK Toolkit Stack. It was created by `cdk bootstrap` and manages resources necessary for managing your Cloud Applications with AWS CDK.", 
            "CreationTime": "2019-08-14T07:54:03.537Z", 
            "StackName": "CDKToolkit", 
            "StackStatus": "CREATE_COMPLETE", 
            "DriftInformation": {
                "StackDriftStatus": "NOT_CHECKED"
            }
        }
    ]
}

❯  cdk deploy
AccountSetupStack: creating CloudFormation changeset...

 ❌  AccountSetupStack failed: Error [ValidationError]: Template format error: Unrecognized resource types: [AWS::CDK::Metadata]
    at Request.extractError (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18) {
  message: 'Template format error: Unrecognized resource types: [AWS::CDK::Metadata]',
  code: 'ValidationError',
  time: 2019-08-14T07:56:06.949Z,
  requestId: '13dd898f-be69-11e9-b125-17a099ad06ea',
  statusCode: 400,
  retryable: false,
  retryDelay: 137.24931783809552
}
Template format error: Unrecognized resource types: [AWS::CDK::Metadata]
  • What is the expected behavior (or behavior of feature suggested)?

CDK should deploy all of my things like it does in other regions (tested the same stack in eu-west-1 region and it works no sweat).

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

I like deploying stuff. It makes me feel productive 🦄

  • Please tell us about your environment:

    • CDK CLI Version: 1.3.0 (build bba9914)
    • Module Version: n/a
    • 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)

bug packagtools

Most helpful comment

As a workaround you can disable version reporting using --no-version-reporting

All 3 comments

As a workaround you can disable version reporting using --no-version-reporting

But why'd it have tried deploying that resource in an un-supported region? Is this not gated by a region-info check?

I see - we'll incorporate the resources on any stack that does NOT have an explicit region specified... So all reposition ale stacks will get into this...

If you pass a region to the Stack's env, then the resource is conditionally added.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

v-do picture v-do  ·  3Comments

mirazmamun picture mirazmamun  ·  3Comments

slipdexic picture slipdexic  ·  3Comments

Kent1 picture Kent1  ·  3Comments

pepastach picture pepastach  ·  3Comments