endpoints | R Documentation |
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:
get_next_invocation_endpoint
returns the endpoint which R must query for
the next input. R must send a GET
request to this endpoint and will wait
until either a response is received or the Lambda instance is shut down for
inactivity. When Lambda receives an input from, say, an API Gateway, it will
respond to the pending request with details of the input.
get_initialisation_error_endpoint
returns the endpoint to which an error
should be sent if the error occurs when setting up the runtime. This is
distinct from errors that occur during handling of an event.
get_response_endpoint
returns the endpoint to which an event response
should be sent. It is unique for each event.
get_invocation_error_endpoint
returns the endpoint to which errors that
occur during event handling should be sent. It is unique for each event.
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.
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)
config |
A list of configuration values as created by the
|
request_id |
For |
character
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.