(aws-cli): import ressources failed (fail to publish assets) #26922
Labels
@aws-cdk/assets
Related to the @aws-cdk/assets package
bug
This issue is a bug.
closed-for-staleness
This issue was automatically closed because it hadn't received any attention in a while.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Describe the bug
When i try to import supported ressources through
cdk import
command, the command failed with afail: Access Denied
.It seems that the import command use the
DeploymentActionRole
to push assets on staging bucket.Here the output logs:
Expected Behavior
Use
FilePublishingRole
to push assets like the deploy commandCurrent Behavior
The
DeploymentActionRole
used from bootstrap do not have the permission to PutObject on the assets Bucket.aws-cdk/packages/aws-cdk/lib/api/bootstrap/bootstrap-template.yaml
Lines 509 to 517 in 4fd510e
Reproduction Steps
Create an importable ressource manually (i tried with an ECR Repository) and try to import it to an existing CDK stacks
Possible Solution
Use the
FilePublishingRole
to push assetsAdditional Information/Context
Bootstrap used: 12
CDK CLI Version
2.93.0
Framework Version
No response
Node.js Version
18
OS
windows 10
Language
Java
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: