Skip to content

fix(toolkit-lib): preserve publishing role for import templates#1665

Open
sehyun-hwang wants to merge 1 commit into
aws:mainfrom
sehyun-hwang:codex/file-publishing-role-metadata
Open

fix(toolkit-lib): preserve publishing role for import templates#1665
sehyun-hwang wants to merge 1 commit into
aws:mainfrom
sehyun-hwang:codex/file-publishing-role-metadata

Conversation

@sehyun-hwang

@sehyun-hwang sehyun-hwang commented Jun 23, 2026

Copy link
Copy Markdown

Summary

  • copy stack template asset publishing metadata onto generated large template assets
  • preserve file publishing role, external ID, additional assume-role options, and destination region when cdk import uploads an override template
  • add a regression test for generated large import templates

Root cause

cdk import can generate a large CloudFormation override template and publish it as a synthetic file asset. That asset was created with only bucketName and objectKey, so asset publishing used ambient credentials instead of the bootstrap file publishing role. The fix reuses the stack template asset destination metadata from the synthesized asset manifest.

Validation

  • yarn build in packages/@aws-cdk/toolkit-lib reached the package build path through the root build
  • root yarn build passed the @aws-cdk/toolkit-lib tests, including the new regression test
  • root yarn build later failed in aws-cdk .NET init/migrate tests because dotnet is not installed locally

Issue

n/a

Resolves #1664

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

@github-actions github-actions Bot added the p2 label Jun 23, 2026
@aws-cdk-automation aws-cdk-automation requested a review from a team June 23, 2026 02:45
@github-actions github-actions Bot added the bug label Jun 23, 2026
@sehyun-hwang sehyun-hwang marked this pull request as ready for review June 23, 2026 23:51
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.

(import): AssetPublishFailed prevents importing due to S3 access denial

1 participant