handle_event: Process the input of an event, and submit the result to...

View source: R/handle-event.R

handle_eventR Documentation

Process the input of an event, and submit the result to Lambda

Description

If the handler function accepts a named context argument then the Lambda invocation context will be included as an argument. See the section below for more details.

Usage

handle_event(event, config = lambda_config())

Arguments

event

the response received from querying the next invocation endpoint.

config

A list of configuration values as created by the lambda_config function.

Invocations via an API Gateway

Events coming from an API Gateway need to be treated a little differently, both in parsing the event content and in posting the results. Refer to vignette("api-gateway-invocations", package = "lambdr") for details.

Event context

Context is metadata associated with each invocation. If the handler function accepts a context argument then it will automatically receive at runtime a named list consisting of these values along with the arguments in the body (if any). For example, a function such as my_func(x, context) will receive the context argument automatically. The context argument must be named (... will not work).

Refer to vignette("lambda-runtime-in-container", package = "lambdr") for details.


lambdr documentation built on Nov. 25, 2023, 5:08 p.m.