question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Bootstrap required' error message has wrong sample command

See original GitHub issue

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

Running cdk deploy against a stack with a custom resource:

<stack name> failed: Error: This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://123456789012/us-east-1")
This stack uses assets, so the toolkit stack must be deployed to the environment (Run "cdk bootstrap aws://123456789012/us-east-1")

Following the instructions and running cdk bootstrap aws://123456789012/us-east-1 results in:

Expected environment name in format '<account>/<region>', got: aws://123456789012/us-east-1
  • What is the expected behavior (or behavior of feature suggested)?

Error gives sample cdk bootstrap command in expected format.

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

Useful error message

  • Please tell us about your environment:

    • CDK CLI Version: 0.36.0
    • Module Version: 0.36.0
    • OS: Ubuntu
    • 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)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

18reactions
ozbillwangcommented, Sep 11, 2020

Thanks, @clareliguori

I got similar error when run cdk deploy, but with unknown-account/unknown-region

Error: This stack uses assets, so the toolkit stack must be deployed to the environment (Run “cdk bootstrap aws://unknown-account/unknown-region”)

After read your notes, I now know how to run cdk bootstrap. There are not enough documents for us to get help in its README

 $ cdk bootstrap aws://1234/ap-southeast-2
 ⏳  Bootstrapping environment aws://1234/ap-southeast-2...
CDKToolkit: creating CloudFormation changeset...
 0/2 | 11:47:23 PM | CREATE_IN_PROGRESS   | AWS::S3::Bucket | StagingBucket
 0/2 | 11:47:24 PM | CREATE_IN_PROGRESS   | AWS::S3::Bucket | StagingBucket Resource creation Initiated
 1/2 | 11:47:46 PM | CREATE_COMPLETE      | AWS::S3::Bucket | StagingBucket
 2/2 | 11:47:48 PM | CREATE_COMPLETE      | AWS::CloudFormation::Stack | CDKToolkit
 ✅  Environment aws://1234/ap-southeast-2 bootstrapped.

The bootstrap, in fact, creates another cloudformation stack to manage the s3 bucket for lambda assets (zip files)

After that, I can run cdk deploy successfully

10reactions
vegetabillcommented, Aug 13, 2019

I encountered the same issue. I think the error message is fine but it makes it seem like the AWS account and region are not configured even when they are.

I would just update the error message, if anything.

It informs the user how to fix, namely cdk bootstrap

(using named profiles if that is why it appears as unknown in the msg)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validation · Bootstrap v5.0
Bootstrap scopes the :invalid and :valid styles to parent .was-validated class, usually applied to the <form> . Otherwise, any required field without a...
Read more >
Mark error in form using Bootstrap - Stack Overflow
So I was wondering what is the procedure in the Bootstrap framework for this. Or maybe if there are examples showing the form...
Read more >
How to Validate Forms with Bootstrap 5 - Designmodo
How to use Bootstrap 5 form validation to showcase some decent actionable feedback on form data fields and validate forms.
Read more >
Bootstrapping - AWS Cloud Development Kit (AWS CDK) v2
Use the AWS CDK Toolkit's cdk bootstrap command. This is the simplest method and works well if you have only a few environments...
Read more >
10 Most Common Bootstrap Mistakes That Developers Make
This may be because it is not clearly advertised on the Bootstrap site, or because people don't take enough time to read the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found