iliana / rust-crowbar

Wrapper to simplify writing AWS Lambda functions in Rust (using the Python execution environment)
https://docs.rs/crowbar
Apache License 2.0
197 stars 16 forks source link

LambdaContext.get_remaining_time_in_millis() can return negative values. #27

Closed ChristopherMacGown closed 6 years ago

ChristopherMacGown commented 6 years ago

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.