Skip to content
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

'null' values are not allowed in templates #38

Closed
bmetea opened this issue Oct 17, 2018 · 3 comments
Closed

'null' values are not allowed in templates #38

bmetea opened this issue Oct 17, 2018 · 3 comments

Comments

@bmetea
Copy link

bmetea commented Oct 17, 2018

Hi, first of all thank you for creating this plugin. It will make my life so much easier when I get it working. Not sure if this is a bug or I'm not doing it properly but every time I try to deploy using the plugin i get the following:

Serverless: Validating template...
 
  Error --------------------------------------------------
 
  The CloudFormation template is invalid: [/Resources/GetDashtickerDashdropdownsLambdaFunctionAliasLive/Type/FunctionVersion/Fn::GetAtt/0] 'null' values are not allowed in templates
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Stack Trace --------------------------------------------
 
Error: The CloudFormation template is invalid: [/Resources/GetDashtickerDashdropdownsLambdaFunctionAliasLive/Type/FunctionVersion/Fn::GetAtt/0] 'null' values are not allowed in templates
    at provider.request.catch (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/validateTemplate.js:25:13)
From previous event:
    at AwsDeploy.validateTemplate (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/lib/validateTemplate.js:20:12)
From previous event:
    at AwsDeploy.BbPromise.bind.then (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:121:39)
From previous event:
    at Object.aws:deploy:deploy:validateTemplate [as hook] (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:117:10)
    at BbPromise.reduce (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:390:55)
From previous event:
    at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.spawn (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:408:17)
    at AwsDeploy.BbPromise.bind.then (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:95:48)
From previous event:
    at Object.deploy:deploy [as hook] (/usr/lib/node_modules/serverless/lib/plugins/aws/deploy/index.js:91:10)
    at BbPromise.reduce (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:390:55)
From previous event:
    at PluginManager.invoke (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:390:22)
    at PluginManager.run (/usr/lib/node_modules/serverless/lib/classes/PluginManager.js:421:17)
    at variables.populateService.then.then (/usr/lib/node_modules/serverless/lib/Serverless.js:157:33)
    at runCallback (timers.js:705:18)
    at tryOnImmediate (timers.js:676:5)
    at processImmediate (timers.js:658:5)
    at process.topLevelDomainCallback (domain.js:121:23)
From previous event:
    at Serverless.run (/usr/lib/node_modules/serverless/lib/Serverless.js:144:8)
    at serverless.init.then (/usr/lib/node_modules/serverless/bin/serverless:43:50)
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           10.12.0
     Serverless Version:     1.32.0
 
Exited with code 1

The deployment settings for my function are:

deploymentSettings:
      type: Linear10PercentEvery1Minute
      alias: Live

Would anyone know why? Thanks

@davidgf
Copy link
Owner

davidgf commented Oct 17, 2018

Hey @meteabogdan, could I have a look at the CloudFormation template generated by Serverless and the serverless.yml file?

@bmetea
Copy link
Author

bmetea commented Oct 18, 2018

Hi @davidgf,
I found the problem.
The versionFunctions serverless parameter was set to false because we ran out of lambda storage and we weren't really rolling back using the versions anyway.
So, if anyone else runs into this problem, it could be that function versioning is off. Turning it back on would fix it.
Thank you for your time! And thanks for the plugin!

@asaf-kali
Copy link

asaf-kali commented Jul 12, 2023

For anyone who gets here in the future, under provider section, remove this line (the default value is true):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants