Disable pushing to serverless platform in 1.17

I am working on a simple service, but with 1.17, serverless tries to publish this information to serverless platform and it fails. This is adding to deployment time.

How can i turn this off and let serverless function like 1.11 (I upgraded from 1.11 to 1.17). Here are the details of the error and the time it takes to deploy the build on AWS.

it use to take just under 4 minutes but now its taking about 15 minutes

Serverless: Publish service to Serverless Platform…
Serverless: Couldn’t publish this deploy information to the Serverless Platform.

Error --------------------------------------------------

GraphQL error: Lambda services-publishService threw an Error during invokation

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Forums: forum.serverless.com
Chat: gitter.im/serverless/serverless

Your Environment Information -----------------------------
OS: darwin
Node Version: 7.2.1
Serverless Version: 1.17.0

real 15m53.048s
user 0m6.606s
sys 0m2.164s

any ideas anyone? I do not want my information to be pushed to serverless platform yet and it increases already slow deployment time

You haven’t mentioned it, so I have to as: Are you using the packaging settings?

No, I am not using packaging settings. Should I be looking into that setting? I migrated from 1.11 to 1.17 so I may have to go back to review the features introduced between these versions

Yes, you should definitely investigate these settings - they are there to address this exact issue.

One thing that recently changed is that now devDependencies are not included in your function package. If you have your dependencies defined in the appropriate locations in your package.json (i.e. depenedencies vs devDependencies) then your package contents will change, and hopefully get much smaller!

Even if that doesn’t solve your issue completely, you can then use the packaging settings linked above to explicitly include/exclude the files you want included via globs)

Oh, I only just re-read your question and noticed you’re talking about the Servleress Platform things - I thought your issue was due to package size! You might want to ignore some of my earlier advice :upside_down_face:

I haven’t seen that issue yet, but will see what I can dig up in the code.

Hi Pgali, sorry for the inconvenience. Publishing by the Platform only happens if you ran serverless login before and logged into the Platform. By running severless logout you again can opt-out of this feature. If you still want to be logged in, but track only some services you can set publish to false in the service object inside the serverless.yml e.g.

  name: my-service
  publish: false

I hope this helps.

P.S: The Platform shouldn’t have failed here. We are going to look into the bug. Feel free to always reach out to us directly.

1 Like