When invoked with AWS sam, a LambdaContext's get_remaining_time_in_millis() can return negative values.
I've submitted an issue upstream to awslabs/aws-sam-local#253. Should they not choose to fix it the documentation of LambdaContext.get_remaining_time_in_millis should probably be changed to recommend the Result<T>.unwrap_or() over the early returning try operator.
When invoked with AWS sam, a
LambdaContext
'sget_remaining_time_in_millis()
can return negative values.I've submitted an issue upstream to awslabs/aws-sam-local#253. Should they not choose to fix it the documentation of
LambdaContext.get_remaining_time_in_millis
should probably be changed to recommend theResult<T>.unwrap_or()
over the early returning try operator.