Skip to content

fix: bootstrap fails if bucket, ECR repo already exist#1544

Merged
aws-cdk-automation merged 1 commit into
mainfrom
huijbers/bootstrap-existing
May 22, 2026
Merged

fix: bootstrap fails if bucket, ECR repo already exist#1544
aws-cdk-automation merged 1 commit into
mainfrom
huijbers/bootstrap-existing

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented May 22, 2026

If a bootstrap stack is deleted, for safety it leaves behind the S3 Bucket and ECR repository used for storing assets. This will interfere with re-bootstrapping.

Fortunately CloudFormation has an option to automatically adopt hard-named resources into a new stack, so we turn that on by default for bootstrapping. This will get rid of those errors.

The chances this will interfere with normal operation is minimal, but on the off chance it does this behavior can be switched off with a --no-import-existing-resources flag.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

If a bootstrap stack is deleted, for safety it leaves behind the S3
Bucket and ECR repository used for storing assets. This will interfere
with re-bootstrapping.

Fortunately CloudFormation has an option to automatically adopt
hard-named resources into a new stack, so we turn that on by default
for bootstrapping. This will get rid of those errors.

The chances this will interfere with normal operation is minimal,
but on the off chance it does this behavior can be switched off
with a `--no-import-existing-resources` flag.
@rix0rrr rix0rrr requested a review from a team May 22, 2026 08:21
@github-actions github-actions Bot added the p2 label May 22, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.16%. Comparing base (c317d2c) to head (448f6dc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1544      +/-   ##
==========================================
- Coverage   88.18%   88.16%   -0.02%     
==========================================
  Files          76       76              
  Lines       10839    10841       +2     
  Branches     1493     1494       +1     
==========================================
  Hits         9558     9558              
- Misses       1253     1255       +2     
  Partials       28       28              
Flag Coverage Δ
suite.unit 88.16% <100.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aws-cdk-automation aws-cdk-automation added this pull request to the merge queue May 22, 2026
Merged via the queue into main with commit e1cd6bc May 22, 2026
46 checks passed
@aws-cdk-automation aws-cdk-automation deleted the huijbers/bootstrap-existing branch May 22, 2026 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants