endpoints {lambdr}R Documentation

AWS Lambda endpoints

Description

These endpoints are configured based on the "AWS_LAMBDA_RUNTIME_API" environment variable set by AWS Lambda during initialisation. They generally won't be available locally. The "AWS_LAMBDA_RUNTIME_API" environment variable (accessed through lambda_config) is used in the following functions:

The values returned by get_next_invocation_endpoint and get_initialisation_error_endpoint are unique in each Lambda instance. That is, the runtime only needs to retrieve their values once. The values returned by get_response_endpoint and get_invocation_error_endpoint are determined by the request_id argument that these functions require, and so need to be recalculated for each event. The request ID is given in the "lambda-runtime-aws-request-id" header in the event.

Usage

get_next_invocation_endpoint(config, runtime_api)

get_initialisation_error_endpoint(config, runtime_api)

get_response_endpoint(config, request_id)

get_invocation_error_endpoint(config, request_id)

Arguments

config

A list of configuration values as created by the lambda_config function. Alternatively, a runtime API host can be provided directly. This would be the case if there's not enough information available to build a full configuration object due to an error.

request_id

For get_response_endpoint and get_invocation_error_endpoint, the ID of the particular event/request. This is provided in the "lambda-runtime-aws-request-id" header of the event.

Value

character


[Package lambdr version 1.2.5 Index]