When running a lambda function locally with serverless invoke local, the conditions defined in serverless.yml are not applied. Changing the hook from before:package:initialize to initialize allows the conditions to be applied both when running serverless offline and serverless invoke local ...
I also ran npm audit fix in a second commit to update vulnerabilities.
When running a lambda function locally with
serverless invoke local
, the conditions defined in serverless.yml are not applied. Changing the hook frombefore:package:initialize
toinitialize
allows the conditions to be applied both when runningserverless offline
andserverless invoke local ...
I also ran
npm audit fix
in a second commit to update vulnerabilities.