-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug: AWS::Serverless::Function ImageUri
with map (ex: using !Sub
) fails with type error
#7117
Comments
ImageUri
with !Sub fails with type errorImageUri
with map (ex: using !Sub) fails with type error
ImageUri
with map (ex: using !Sub) fails with type errorImageUri
with map (ex: using !Sub
) fails with type error
My only workaround is to stay on v1.116.0 |
Hi @rt-joe, thanks for reporting the issue. We are actively working on a fix for this and will keep you posted. |
Hey @rt-joe, would you be able to share your SAM project or a sample one that has your failing case, I want to make sure that I am able to reproduce your exact issue. |
@jysheng123 I unfortunately can't share the original SAM project since it's private but I created a sample project to repro my issue as close as possible |
This PR will be included in the next SAM CLI regular release, fixing your issue. |
Patch is released in v1.119.0. Closing |
Verified it fixes my issue. Thanks for quick turnaround! |
Description:
sam deploy
fails with errorError: expected str, bytes or os.PathLike object, not OrderedDict
We use a
!Sub
plus a!FindInMap
to resolve theImageUri
to a pre-built image for aAWS::Serverless::Function
based on aws account id. Something like:Sam cli tries to parse the
ImageUri
value as a string path, not expecting a map.May have been introduced by #6930.
It was working prior to
v1.117.0
Steps to reproduce:
Define resource
AWS::Serverless::Function
withPackageType: Image
andImageUri
that uses!Sub
with variable map (not using short form).Run
sam deploy
.See this sample repo
Observed result:
Expected result:
ImageUri
is resolved correctly, deployment succeedsAdditional environment details (Ex: Windows, Mac, Amazon Linux etc)
The text was updated successfully, but these errors were encountered: