The context object is being recreated without the getRemainingTimeInMillis function, so sls function run crashes if it's used in the handler.
context
getRemainingTimeInMillis
sls function run