So, if I changed logic in class User(users.js), how could I deploy it instead of re-deploy the whole service?
I know I can re-deploy individual function by using sls deploy function -f <function name>,
then, how could I overwrite the same users.js in the latest deployment, as well as the serverless.yml file if made some changes.
As your said, maybe there is no way to just update serverless.yml but have to deploy all.
How about update other files individually, such as uuid.js, moment.js, _users.j_s and so on?
Those files are changing time and time again, but my functions in handler.js may not change so frequently.
You can’t update a single file in an existing function because AWS doesn’t allow it. You need to deploy a new package with all of the files required by that function.