AWS.Lambda.Runtime.Context (AWS Lambda Runtime v0.1.1)

View Source

Per-invocation context, assembled from the Lambda-Runtime-* response headers of GET /runtime/invocation/next plus the static function environment.

This is the second argument passed to your handler.

Summary

Functions

Builds a context from the response headers of GET /runtime/invocation/next, filling in the rest from the function's static environment variables.

Milliseconds left before Lambda kills the sandbox.

Functions

from_headers(headers)

Builds a context from the response headers of GET /runtime/invocation/next, filling in the rest from the function's static environment variables.

remaining_time_ms(context)

Milliseconds left before Lambda kills the sandbox.

The deadline is an absolute Unix timestamp in milliseconds, so this is computed against wall clock time rather than a monotonic clock.