For Development Perpose / Testing always do npm i -D
For Production Perpose npm i
commands to run:
For AWS LAMBDA:
there is serverless.yaml
also add required variables.
like this: while running serverless deploy
command
--STAGE <production or dev or staging whatever> --MONGO_URL <MONGO URL> --REGION < e.g: us-east-2>