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

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

Closed
1 of 5 tasks
PaulMaddox opened this issue Aug 14, 2019 · 3 comments · Fixed by #3692
Closed
1 of 5 tasks

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

PaulMaddox opened this issue Aug 14, 2019 · 3 comments · Fixed by #3692
Assignees
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI

Comments

@PaulMaddox
Copy link
Contributor

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 ...

    • 🪲 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

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)

@PaulMaddox PaulMaddox added the needs-triage This issue or PR still needs to be triaged. label Aug 14, 2019
@eladb
Copy link
Contributor

eladb commented Aug 14, 2019

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

@RomainMuller
Copy link
Contributor

RomainMuller commented Aug 15, 2019

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

@RomainMuller
Copy link
Contributor

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.

RomainMuller added a commit that referenced this issue Aug 16, 2019
For relocatable stacks (those where no `region` is provided to the
`core.Stack` constructor while synthesizing), generate a condition to
only try to populate the `AWS::CDK::Metadata` resource in regions that
are known to support it.

Fixes #3648
@RomainMuller RomainMuller added bug This issue is a bug. @aws-cdk/core Related to core CDK functionality package/tools Related to AWS CDK Tools or CLI and removed needs-triage This issue or PR still needs to be triaged. @aws-cdk/core Related to core CDK functionality labels Aug 26, 2019
@mergify mergify bot closed this as completed in #3692 Sep 17, 2019
mergify bot pushed a commit that referenced this issue Sep 17, 2019
* feat(toolkit): conditionally emit AWS::CDK::Metadata resource

For relocatable stacks (those where no `region` is provided to the
`core.Stack` constructor while synthesizing), generate a condition to
only try to populate the `AWS::CDK::Metadata` resource in regions that
are known to support it.

Fixes #3648

* fix typo

* use higher level primitives

* move condition name to a variable

* fix broken unit test
eladb pushed a commit that referenced this issue Sep 23, 2019
* feat(toolkit): conditionally emit AWS::CDK::Metadata resource

For relocatable stacks (those where no `region` is provided to the
`core.Stack` constructor while synthesizing), generate a condition to
only try to populate the `AWS::CDK::Metadata` resource in regions that
are known to support it.

Fixes #3648

* fix typo

* use higher level primitives

* move condition name to a variable

* fix broken unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants