ProtectedconstructorCreate an Adapter.
The blueprint to create the adapter.
Protected ReadonlyblueprintProtected ReadonlyhooksProtected ReadonlymiddlewareProtected ReadonlyresolvedProtectedbuildBuild the raw response.
The event context.
OptionaleventHandler: AdapterEventHandlerType<IncomingHttpEvent, OutgoingHttpResponse>
The event handler to be run.
The raw response wrapper.
ProtectedeventProcesses an incoming AWS Lambda HTTP event.
Converts a raw AWS Lambda HTTP event into an IncomingHttpEvent, processes it through
the Stone.js pipeline, and generates a RawHttpResponse to send back.
The raw HTTP event received from AWS Lambda.
The AWS Lambda execution context associated with the event.
A promise resolving to the processed RawHttpResponse.
ProtectedexecuteExecute the event handler lifecycle hooks.
The hook to execute.
The event handler to be run.
ProtectedexecuteExecute adapter lifecycle hooks.
The hook's name.
Optionalcontext: AwsLambdaHttpAdapterContext
The event context.
Optionalerror: any
The error to handle.
ProtectedhandleHandle error.
The error to handle.
The event context.
The raw response.
ProtectedhandleHandle the event.
The event context.
The event handler to be run.
The raw response wrapper.
ProtectedmakeCreate pipeline options for the Adapter.
The pipeline options for transforming the event.
ProtectedonInitializes the adapter and validates its execution context.
Ensures that the adapter is running in an AWS Lambda environment. Throws an error if it detects that the adapter is being used in an unsupported environment (e.g., a browser).
ProtectedresolveGet the error handler for the given error.
The error to get the handler for.
The error handler.
ProtectedresolveExecutes the adapter and provides an AWS Lambda-compatible HTTP handler function.
This method initializes the adapter and returns a handler function that can
process HTTP events in AWS Lambda. It transforms raw events into IncomingHttpEvent
instances and produces RawHttpResponse objects as output.
The type representing the AWS Lambda event handler function.
A promise resolving to the AWS Lambda HTTP handler function.
ProtectedsendSend the raw event through the destination.
The event context.
The event handler to be run.
Platform-specific response.
ProtectedvalidateValidate the context and event handler.
The context to validate.
The event handler to validate.
StaticcreateCreates an instance of the AwsLambdaHttpAdapter.
The application blueprint.
A new instance of AwsLambdaHttpAdapter.
AWS Lambda HTTP Adapter for Stone.js.
The
AwsLambdaHttpAdapterextends the functionality of the Stone.jsAdapterto provide seamless integration with AWS Lambda for HTTP-based events. This adapter transforms incoming HTTP events from AWS Lambda intoIncomingHttpEventinstances and produces aRawHttpResponseas output.This adapter simplifies the process of handling HTTP events within AWS Lambda while adhering to the Stone.js framework's event-driven architecture.
Template: AwsLambdaHttpEvent
The type of the raw HTTP event from AWS Lambda.
Template: RawHttpResponse
The type of the raw HTTP response to send back.
Template: AwsLambdaContext
The AWS Lambda execution context type.
Template: IncomingHttpEvent
The type of the processed incoming HTTP event.
Template: IncomingHttpEventOptions
Options used to create an incoming HTTP event.
Template: OutgoingHttpResponse
The type of the outgoing HTTP response after processing.
Template: AwsLambdaHttpAdapterContext
Context type specific to the HTTP adapter.
Example
See