In case your programming teacher forgot to tell you 'global scope is evil'. A quick demo on how to break lambda containers by keeping things in global scope.
Handler that does no evil.
Handler that uses global scope without unwanted side-effects.
Handler that uses global scope that can be catastrophic for the container instance.
Deploy with sls deploy
then curl
the resulting endpoints. Use query param fail=true
to fail handler's promise chain.