You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
When using serverless-sam to generate SAM template from serverless template which has multiple templates included I'm getting an invalid template with incorrect function names and incomplete template with no handlers.
Here is the log:
serverless sam export --output ./sam-template-generated.yml --profile admin --stage=sit1 --region=ap-southeast-2
Serverless: Working folder: /Users/apsn/Documents/Work/node_modules/serverless-sam
Serverless: Validate
Serverless: Preparing original CloudFormation template
Serverless: Packaging functions
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Export:
Serverless: Exporting resources
Serverless: Exporting outputs
Serverless: Exporting parameters
Serverless: Exporting conditions
Serverless: Exporting functions
Serverless: Exporting function: 0 as 0
Serverless: Exporting function: 1 as 1
Serverless: Exporting function: 2 as 2
Serverless: Exporting function: 3 as 3
Serverless: SAM template written to: /Users/apsn/Documents/Work/sam-template-generated.yml
Looks like the issue is happening only when the serverless.yml file contains references to files containing functions definitions under functions section. When the functions are directly defined under functions section of serverless.yml the plugin works fine.
Hi,
When using serverless-sam to generate SAM template from serverless template which has multiple templates included I'm getting an invalid template with incorrect function names and incomplete template with no handlers.
Here is the log:
Here is the sample generated template.
The function names are exported as 0, 1, 2, 3 etc and there are no handlers generated!
Attached the serverless and generated sam templates.
files.zip
Cheers
The text was updated successfully, but these errors were encountered: