I am using Serverless in AWS and I have a question regarding the behaviour of updating functions (or not).
Just a question about how Serverless (namely, version 1.40.0) works regarding deployments.
I have 3 functions defined in my template and I am using
serverless-prune-plugin plugins. I should say each function is packaged separately .
I added a new function to my template and did not change any code or configurations from the previous 3 functions . I was expecting (probably in a wrong way) that the previous 3 functions would not be updated (meaning a new Lambda version would not be created) but that is not the case. This pops some questions in my head (according to this behaviour and Serverless documentation):
Serverless fetches the hashes for all files of the previous deployment (if any) and compares them against the hashes of the local files.
- Previous deployment = previous CloudFormation stack or previously deployed packages?
- Since the packaging is done individually, the compared hashes are per package? If not, how does it work?
Thank you in advance.