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 bootstrap: Error running cdk bootstrap with yaml template #31547

Open
1 task
CFarinellaCM opened this issue Sep 24, 2024 · 2 comments
Open
1 task

cdk bootstrap: Error running cdk bootstrap with yaml template #31547

CFarinellaCM opened this issue Sep 24, 2024 · 2 comments
Assignees
Labels
bug This issue is a bug. closing-soon This issue will automatically close in 4 days unless further comments are made. p2 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

@CFarinellaCM
Copy link

Describe the bug

Running command:
cdk bootstrap --template bootstrap-template.yaml --profile

Returns error message:
Error: Trying to perform an operation that requires a bootstrap stack; you should not see this error, this is a bug in the CDK CLI.

Full trace below:
⏳ Bootstrapping environment aws://account-id/ap-southeast-2...
❌ Environment aws://account-id/ap-southeast-2 failed bootstrapping: Error: Trying to perform an operation that requires a bootstrap stack; you should not see this error, this is a bug in the CDK CLI. ❌ Environment aws://account-id/ap-southeast-2 failed bootstrapping: Error: Trying to perform an operation that requires a bootstrap stack; you should not see this error, this is a bug in the CDK CLI.
at NoBootstrapStackEnvironmentResources.lookupToolkit (C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:463:19087)
at makeBodyParameter (C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:453:93731)
at deployStack (C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:463:259)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:468:2348
at async Promise.all (index 0)
at async CdkToolkit.bootstrap (C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:468:2193)
at async exec4 (C:\Users\profile.name\AppData\Roaming\npm\node_modules\aws-cdk\lib\index.js:521:54490)

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Version

No response

Expected Behavior

cdk bootstrap to run to completion

Current Behavior

Command is failing to execute

Reproduction Steps

Generate template
cdk bootstrap --show-template > bootstrap-template.yaml

Run command
cdk bootstrap --template bootstrap-template.yaml --profile

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.159.1 (build c66f4e3)

Framework Version

No response

Node.js Version

v20.11.0

OS

Windows 10 Enterprise

Language

TypeScript

Language Version

No response

Other information

No response

@CFarinellaCM CFarinellaCM added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 24, 2024
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Sep 24, 2024
@ashishdhingra ashishdhingra self-assigned this Sep 25, 2024
@ashishdhingra ashishdhingra added p2 investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Sep 25, 2024
@ashishdhingra
Copy link
Contributor

@CFarinellaCM Good afternoon. Unfortunately, I'm unable to reproduce the issue. Executing cdk bootstrap --template ~/bootstrap-template.yaml --profile default aws://ACCOUNTID-REDACTED/ap-southeast-2 works fine:

Using bootstrapping template from /Users/REDACTED/bootstrap-template.yaml
 ⏳  Bootstrapping environment aws://ACCOUNTID-REDACTED/ap-southeast-2...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
CDKToolkit: creating CloudFormation changeset...
 ✅  Environment aws://ACCOUNTID-REDACTED/ap-southeast-2 bootstrapped.

Could you please execute the cdk bootstrap command with --debug true option to get detailed logs?

Per cdk bootstrap, the bootstrap stack is a CloudFormation stack that provisions an Amazon S3 bucket and Amazon ECR repository in the AWS environment. Do you have sufficient permissions to create CDK bootstrap stack in the destination account and/or region?

Thanks,
Ashish

@ashishdhingra ashishdhingra added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Sep 26, 2024
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 the closing-soon This issue will automatically close in 4 days unless further comments are made. label Oct 11, 2024
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. closing-soon This issue will automatically close in 4 days unless further comments are made. p2 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

2 participants