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

cdk cli synth: Erroneous error - CDK bootstrap stack version 6 required #22907

Closed
mcqj opened this issue Nov 14, 2022 · 7 comments
Closed

cdk cli synth: Erroneous error - CDK bootstrap stack version 6 required #22907

mcqj opened this issue Nov 14, 2022 · 7 comments
Assignees
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@mcqj
Copy link

mcqj commented Nov 14, 2022

Describe the bug

When creating a very simple stack using cdk init, cdk synth fails with the error message shown below.

AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI

However, retrieving the version from parameter store shows bootstrap version 14.

cdk deploy does correctly deploy the stack, so the problem is only with synth.

Expected Behavior

cdk synth should create Cloudformation template

Current Behavior

'cdk synth` errors out, expecting a specific (and old) version of bootstrap.

Reproduction Steps

Create a new stack with

cdk init app --language javascript

Bootstrap with

cdk bootstrap

Try to synthesize with

cdk synth

Possible Solution

Update the version check in cdk synth

Additional Information/Context

No response

CDK CLI Version

2.50.0

Framework Version

2

Node.js Version

16.18.0

OS

Macos Monterey

Language

Typescript

Language Version

Using Javascript

Other information

No response

@mcqj mcqj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Nov 14, 2022
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Nov 14, 2022
@mcqj mcqj changed the title (module name): (short issue description) cdk cli synth: Erroneous error - CDK bootstrap stack version 6 required Nov 14, 2022
@peterwoodworth
Copy link
Contributor

Hey @mcqj,

I wasn't able to reproduce this following your reproduction steps.

I suspect that because this is occurring during synth, that you might be performing some lookups such as Vpc.fromLookup. Are you making any lookup calls in your CDK application?

Additionally, can you verify the account + region you are synthesizing in, and make sure that that region is the region that has been bootstrapped with version 14?

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. bug This issue is a bug. labels Nov 15, 2022
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Nov 17, 2022
@ghost
Copy link

ghost commented Dec 6, 2022

I have exactly this problem, using the stack generated with cdk init -l typescript from CDK v2.53.0. Node v18.12.1 on macOS Ventura 13.0.1.

Parameter Store has /cdk-bootstrap/xxx/version → 14, everything is in us-east-1

@kr0ggg
Copy link

kr0ggg commented Mar 26, 2023

I have also received this exact problem using cdk version: 2.70.0 (build c13a0f1) this week.

I am just running the basic cdk init template stack as shown below. cdk deploy works.

import * as cdk from 'aws-cdk-lib';
import { Construct } from 'constructs';
import * as sqs from 'aws-cdk-lib/aws-sqs';

export class CdkWorkshopStack extends cdk.Stack {
  constructor(scope: Construct, id: string, props?: cdk.StackProps) {
    super(scope, id, props);

    // The code that defines your stack goes here

    // example resource
     const queue = new sqs.Queue(this, 'CdkWorkshopQueue', {
       visibilityTimeout: cdk.Duration.seconds(300),
       queueName: 'AddSongQueue'
     });
  }
}

@romulous75
Copy link

romulous75 commented Jun 22, 2023

I also have this issue:

cdk --version
2.85.0 (build 4e0d726)
cdk bootstrap
✅  Environment aws://xxxxxxxxxxxxx/xxxxxxxxxxxx bootstrapped (no changes).
cdk synth
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.

And:

cdk diff

Other Changes
[+] Unknown Rules: {"CheckBootstrapVersion":{"Assertions":[{"Assert":{"Fn::Not":[{"Fn::Contains":[["1","2","3","4","5"],{"Ref":"BootstrapVersion"}]}]},"AssertDescription":"CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."}]}}
cdk list
CdkStack

@buchananta
Copy link

For anyone else who stumbles across this. It looks like this isn't actually an error, but a terrible UI design

@mat01
Copy link

mat01 commented Aug 30, 2023

Is it unreasonable to expect AWS to fix it, so that people (particularly beginners) are not concerned by 'error messages' that seem to mean nothing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. package/tools Related to AWS CDK Tools or CLI response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

7 participants