fix(cli): cross-account asset publishing doesn't work without bootstrap stack#31876
fix(cli): cross-account asset publishing doesn't work without bootstrap stack#31876mergify[bot] merged 2 commits intomainfrom
Conversation
…ap stack If the bootstrap stack can't be found, it can't be validated. We used to fail closed, but that just means that cross-account publishing is broken. Instead, we have to fail open. Fixes #31866.
aws-cdk-automation
left a comment
There was a problem hiding this comment.
The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.
A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
|
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
|
Comments on closed issues and PRs are hard for our team to see. |
When determining whether or not to allow cross-account bucket uploads, we inspect the bootstrap stack in the account we're deploying to:
However, if the bootstrap stack can't be found, it can't be validated. This can happen if the customer provisions their resources differently than via the bootstrap stack.
When that happens, we used to fail closed: but that just means that cross-account asset uploads are now prohibited, and not having a bootstrap stack and expecting assets to be uploaded to a different account in your organization should be a valid setup.
So instead, we have to fail open: if we can't find the bootstrap stack, we do allow cross-account asset uploads. We treat this check more as a best-effort sanity check. This is not the only protection mechanism we have, so the local check is more of a bonus.
Fixes #31866.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license