[]Struct lando::LambdaContext

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)] (https://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html) in the AWS Lambda docs.

Methods

impl<'a> LambdaContext<'a>

Name of the Lambda function that is executing.

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.

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.

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.

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.

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

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.

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.

Auto Trait Implementations

impl<'a> !Send for LambdaContext<'a>

impl<'a> !Sync for LambdaContext<'a>

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Borrow for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Immutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

Important traits for &'a mut R

Mutably borrows from an owned value. Read more

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more