-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Provide passthrough Code
property for AWS::Serverless::Function
.
#3358
Comments
Hi thanks for creating a issue. I apologize for the trouble you've been through. I'll bring it up for discussion with the team and get back to you soon. |
Hi @garretwilson, I've brought this up to the team and we're having discussion on potential workaround/solution. Meanwhile I just want to quickly confirm that you've also tried with the following syntax and it doesn't work for you.
|
Well I'd like to answer your question, but suddenly SAM is doing all sorts of crazy things, as I just reported in aws/aws-sam-cli#6014. (Sigh. If it's not one thing, it's another thing breaking.) |
@GavinZZ , I have wonderful news! (Note that the SAM traceback in aws/aws-sam-cli#6014 is still happening, but it doesn't seem to impede the actual deployment.) The format you asked about worked: CodeUri:
Bucket:
Fn::ImportValue:
!Sub "other-stack-${env}:stagingBucket"
Key: !Sub "foo-${ver}-aws-lambda.zip" It seems that I wonder why nobody mentioned this during the long discussion in #3264? 🤔 Is the |
Great to hear that and hopefully this syntax will unblock you. 🎉🎉🎉
|
Going to mark this issue as resolved. Feel free to re-open if you have any additional questions. |
In that case, feel free to close this current ticket as "invalid", because SAM already has exactly what I was requesting! Note also that #3264 therefore doesn't impact me, since I can always use the passthrough properties. I'm so happy to find this out. Thanks for taking the time to suggest that. |
SAM's
AWS::Serverless::Function
removes the ability to use imported values in referring to the bucket and filename of my uploaded ZIP file for AWS Lambda. This is an inherent issue with the SAM transform design; see e.g. #2533 and a long comment in another ticket explaining all the gory details.As explained in detail in #3264, I can do the following just fine using AWS::Lambda::Function, which uses Code instead of CodeUri. It looks like this:
But I can't do that with
AWS::Serverless::Function
:That produces:
Please add a Code pass-through property to AWS::Serverless::Function so we can at least work around this shortcoming in the design of SAM.
The text was updated successfully, but these errors were encountered: