Skip to content

cli: #21513 breaks custom bootstrap use case #21965

@rabbittsoup

Description

@rabbittsoup

Describe the bug

PR #21513 introduced asset prebuilding. This presumes that bootstrap resources have been deployed prior to and outside the scope of the currently deploying CDK project. However, we have restrictions on our accounts that prevent us from deploying the account wide default cdk bootstrap resources. Instead, we deploy project specific custom bootstrap resources within the currently deploying CDK project. The project specific custom bootstrap resource stack is deployed immediately before the project's main stacks, which allows us to bootstrap a specific project and meet our account requirements. This scenario means the bootstrap resources are not available before initial project deployment, and results in a "Error: Building Assets Failed" when the project includes assets, even though the bootstrap resources will be available by the time the assets are needed.

Expected Behavior

Bootstrap resources get used just-in-time.

Current Behavior

Bootstrap resources get used before project deployment.

Reproduction Steps

app.py.txt

Possible Solution

Rollback PR #21513?

Additional Information/Context

No response

CDK CLI Version

2.39.0

Framework Version

2.39.0

Node.js Version

14.16.0

OS

Amazon Linux 2

Language

Python

Language Version

3.8.13

Other information

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.needs-reproductionThis issue needs reproduction.p1package/toolsRelated to AWS CDK Tools or CLI

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions