Struct gateway::LambdaContext [] [src]

pub struct LambdaContext<'a> { /* fields omitted */ }

Provides a view into the context object available to Lambda functions.

Context object methods and attributes are documented at The Context Object (Python) in the AWS Lambda docs.

Methods

impl<'a> LambdaContext<'a>
[src]

[src]

Name of the Lambda function that is executing.

[src]

The Lambda function version that is executing. If an alias is used to invoke the function, then function_version will be the version the alias points to.

[src]

The ARN used to invoke this function. It can be function ARN or alias ARN. An unqualified ARN executes the $LATEST version and aliases execute the function version it is pointing to.

[src]

Memory limit, in MB, you configured for the Lambda function. You set the memory limit at the time you create a Lambda function and you can change it later.

[src]

AWS request ID associated with the request. This is the ID returned to the client that called the invoke method.

Note: If AWS Lambda retries the invocation (for example, in a situation where the Lambda function that is processing Amazon Kinesis records throws an exception), the request ID remains the same.

[src]

The name of the CloudWatch log group where you can find logs written by your Lambda function.

[src]

The name of the CloudWatch log stream where you can find logs written by your Lambda function. The log stream may or may not change for each invocation of the Lambda function.

[src]

Returns the remaining execution time, in milliseconds, until AWS Lambda terminates the function.

This returns ContextError::GetRemainingTimeFailed if crowbar is unable to call the method or cast it to a u64 from the Python object. This should generally never happen, so you should simply call this as context.get_remaining_time_in_millis()? in your function.