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.
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
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.
service:
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.