Is there a way I can exclude the readme file and sls-templates (which contains my other serverless code) folder from getting uploaded to lambda? I deployed using the serverless framework and it is kind of weird to see my other serverless templates files showing up. Not a big deal though I'm just worried about the size in case my Serverless code base expands.
Absolutely. You can manually include or exclude files in your serverless.yml
.
package:
exclude:
- node_modules/**
See more here: https://www.serverless.com/framework/docs/providers/aws/guide/packaging/