Parsed JSON data in the lambda request payload. For an AWS service triggered lambda this should be in the format of a type ending in Event, for example the S3Handler receives an event of type S3Event.
Runtime contextual information of the current invocation, for example the caller identity, available memory and time remaining, legacy completion callbacks, and a mutable property controlling when the lambda execution completes.
NodeJS-style completion callback that the AWS Lambda runtime will provide that can be used to provide the lambda result payload value, or any execution error. Can instead return a promise that resolves with the result payload value or rejects with the execution error.
Generated using TypeDoc
The interface that AWS Lambda will invoke your handler with. There are more specialized types for many cases where AWS services invoke your lambda, but you can directly use this type for when you are invoking your lambda directly.
See the AWS documentation for more information about the runtime behavior, and the AWS Blog post introducing the async handler behavior in the 8.10 runtime.
Example
Defining a custom handler type
Example
Logs the contents of the event object and returns the location of the logs
Example
AWS SDK with Async Function and Promises
Example
HTTP Request with Callback
Returns
A promise that resolves with the lambda result payload value, or rejects with the execution error. Note that if you implement your handler as an async function, you will automatically return a promise that will resolve with a returned value, or reject with a thrown value.