-
Notifications
You must be signed in to change notification settings - Fork 14
Fn::Sub or Fn::Join not working for SAR template #32
Comments
@gallor Thanks for reporting this issue. Just to make sure you meant |
@ShreyaGangishetty Do you mean under the Metadata section? I followed this AWS doc to set it up and it had ServerlessRepo as the type (although I did find it odd that I couldn't find any documentation to the Metadata section outside of this page) : https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-template-publishing-applications.html |
@gallor apologies for the confusion, you need to have |
@ShreyaGangishetty Great, thanks so much. Hopefully they'll add support for that. Sorry for the noob question too but how do I look up that issue on aws-sam-cli? I looked at the issue list and this is not showing up (and the activity log looks like you transferred this issue from this repo, then from aws-sam-cli again? Looks like it didn't get transferred). Thanks |
Description:
Don't know if this is a CloudFormation bug or a SAM bug but since the error appears to be coming from the SAM CLI stack I'm making it here.
I'm unable to utilize CloudFormation functions for parameters in my template under the AWS::ServerlessRepo::Application Metadata section to deploy my application to the Serverless Application Repo (SAR).
Steps to reproduce the issue:
Here's my template.yaml
lambda-layers-dev
sam package --template-file template.yaml --s3-bucket lambda-layers-dev --output-template-file packaged.yaml
sam publish --template packaged.yaml
Observed result:
I get the following errors stack trace:
Fn::Sub:
,Fn::Join:
and!Sub
. All throw the same error.Expected result:
When I change in my template the
Name
property under the ServerlessRep to just a string with no CF functions the layer publishes fine.I referenced this page for the params for that section:
https://docs.aws.amazon.com/en_pv/serverless-application-model/latest/developerguide/serverless-sam-template-publishing-applications-metadata-properties.html
Sorry if this is me not understanding/finding some of the documentation and if so let me know what I missed. Thanks!
The text was updated successfully, but these errors were encountered: