This plugin caches serverless.yml and if there is no change in deploy,it just updates the function code
npm install serverless-cache-deploy --save-dev
Then include the plugin within your serverless.yml config.
plugins:
- serverless-cache-deploy
custom.yml
cache:
relativeUrl: ../exampleRelativeUrlToYourDir