aws-cdk-examples
aws-cdk-examples copied to clipboard
Python Lambda From Container ARN error
Describe the bug
Setting use_pre_existing_image = True causes the cdk synth process to fail.
jsii.errors.JSIIError: The
resourcecomponent (6th component) of an ARN is required: arn:aws:ecr:${Token[AWS.Region.7]}:${Token[AWS.AccountId.3]}
Expected Behavior
The cdk synth process should finish successfully.
Current Behavior
Setting use_pre_existing_image = True causes the cdk synth process to fail.
jsii.errors.JSIIError: The
resourcecomponent (6th component) of an ARN is required: arn:aws:ecr:${Token[AWS.Region.7]}:${Token[AWS.AccountId.3]}
Reproduction Steps
Set use_pre_existing_image = True in the app.py in the python/lambda-from-container example
Possible Solution
Adding the resource component to the ARN string should resolve this issue.
Additional Information/Context
No response
CDK CLI Version
2.37.1 (build f15dee0)
Framework Version
No response
Node.js Version
v18.7.0
OS
Mac OSX
Language
Python
Language Version
Python 3.8.9
Left a comment on the PR 🙂
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.