Reference
@reckona/mreact-router/adapters/aws-lambda
15 public exports.
Function
FunctioncreateAwsLambdaRequestHandler
function createAwsLambdaRequestHandler(options: AwsLambdaRequestHandlerOptions): AwsLambdaRequestHandlerCreates a buffered AWS Lambda HTTP API v2 handler for built app-router output. The handler materializes runtime files under `/tmp` by default, starts middleware-focused background preload, applies the generated import policy when requested, and returns API Gateway v2 response objects.FunctioncreateAwsLambdaStreamingRequestHandlerfunction createAwsLambdaStreamingRequestHandler<TContext>(options: AwsLambdaRequestHandlerOptions): AwsLambdaStreamingRequestHandler<TContext>Creates an AWS Lambda streaming response handler for built app-router output. Use this with Lambda response streaming runtimes when HTML or route responses should be written progressively instead of buffered into an API Gateway result.FunctioncreatePreloadedAwsLambdaRequestHandlerfunction createPreloadedAwsLambdaRequestHandler(options: AwsLambdaRequestHandlerOptions): Promise<AwsLambdaRequestHandler>Creates a buffered AWS Lambda handler after eagerly preparing and preloading the built runtime. Use this when startup code can await preload work before the first request instead of letting the first invocation share that cost.FunctioncreatePreloadedAwsLambdaStreamingRequestHandlerfunction createPreloadedAwsLambdaStreamingRequestHandler<TContext>(options: AwsLambdaRequestHandlerOptions): Promise<AwsLambdaStreamingRequestHandler<TContext>>Creates a streaming AWS Lambda handler after eagerly preparing and preloading the built runtime.Interface
InterfaceAwsLambdaHttpEventV2
interface AwsLambdaHttpEventV2Represents the AWS API Gateway HTTP API v2 event consumed by buffered handlers.InterfaceAwsLambdaHttpResultV2interface AwsLambdaHttpResultV2Represents the AWS API Gateway HTTP API v2 result returned by buffered handlers.InterfaceAwsLambdaRequestHandlerOptionsinterface AwsLambdaRequestHandlerOptionsConfigures AWS Lambda request handlers for built app-router output.InterfaceAwsLambdaStreamingResponseMetadatainterface AwsLambdaStreamingResponseMetadataDescribes response metadata passed to Lambda streaming response helpers.InterfaceAwsLambdaStreamingResponseStreaminterface AwsLambdaStreamingResponseStreamDefines the writable stream interface used by Lambda streaming handlers.Re-export
Type Alias
Type AliasAwsLambdaImportPolicy
type AwsLambdaImportPolicy = AppRouterImportPolicy | "generated" | { fromManifest: true }Selects how an AWS Lambda handler resolves its app-router import policy.Type AliasAwsLambdaPreloadStrategytype AwsLambdaPreloadStrategy = "all" | "hot-route-requests" | "middleware" | "none" | { mode: "all" | "hot-route-requests" | "hot-routes" | "middleware" | "none"; routes?: readonly string[]; wait?: "background" | "before-render" | "first-request" }Configures preload behavior for built app-router modules in AWS Lambda.Type AliasAwsLambdaRequestHandlertype AwsLambdaRequestHandler = (event: AwsLambdaHttpEventV2): Promise<AwsLambdaHttpResultV2>Handles one AWS API Gateway HTTP API v2 event with a buffered response.Type AliasAwsLambdaStreamingRequestHandlertype AwsLambdaStreamingRequestHandler = (event: AwsLambdaHttpEventV2, responseStream: AwsLambdaStreamingResponseStream, context: TContext): Promise<void>Handles one AWS API Gateway HTTP API v2 event with a Lambda response stream.