Reference
@reckona/mreact-router/adapters/aws-lambda
45 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 that starts full runtime preparation after the first valid event. Invalid events are rejected before runtime materialization or preload work begins.FunctioncreatePreloadedAwsLambdaStreamingRequestHandlerfunction createPreloadedAwsLambdaStreamingRequestHandler<TContext>(options: AwsLambdaRequestHandlerOptions): Promise<AwsLambdaStreamingRequestHandler<TContext>>Creates a streaming AWS Lambda handler that starts full runtime preparation after the first valid event. Invalid events are rejected before runtime materialization or preload work begins.FunctionwarmAwsLambdaRuntimefunction warmAwsLambdaRuntime(options: AwsLambdaRequestHandlerOptions): Promise<void>Explicitly materializes and preloads a built Lambda runtime before request handling. Call this during controlled Lambda initialization only when the extra startup work is preferable to first-valid-request latency. Request handlers always validate events before they start runtime work.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
Re-exportAppRouterAllowedServerAction
const AppRouterAllowedServerAction: unknownRe-exports server action contracts used by AWS Lambda handlers.Re-exportAppRouterCacheconst AppRouterCache: unknownRe-exports cache contracts used by AWS Lambda handlers.Re-exportAppRouterCacheEntryconst AppRouterCacheEntry: unknownRe-exports cache contracts used by AWS Lambda handlers.Re-exportAppRouterCspInlineNonceWarningLogEventconst AppRouterCspInlineNonceWarningLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterImportPolicyconst AppRouterImportPolicy: unknownRe-exports app-router import policy controls for AWS Lambda handlers.Re-exportAppRouterLogErrorconst AppRouterLogError: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterLogEventconst AppRouterLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterLoggerconst AppRouterLogger: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterPrerenderStoreconst AppRouterPrerenderStore: unknownRe-exports request and rendering contracts used by AWS Lambda handlers.Re-exportAppRouterRenderTimingLogEventconst AppRouterRenderTimingLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterRequestEndLogEventconst AppRouterRequestEndLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterRequestErrorLogEventconst AppRouterRequestErrorLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterRequestStartLogEventconst AppRouterRequestStartLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterRequestTimingLogEventconst AppRouterRequestTimingLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterResponseHookconst AppRouterResponseHook: unknownRe-exports response hook contracts used by AWS Lambda handlers.Re-exportAppRouterResponseHookContextconst AppRouterResponseHookContext: unknownRe-exports response hook contracts used by AWS Lambda handlers.Re-exportAppRouterRuntimeconst AppRouterRuntime: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterServerActionOptionsconst AppRouterServerActionOptions: unknownRe-exports server action contracts used by AWS Lambda handlers.Re-exportAppRouterUpgradeErrorLogEventconst AppRouterUpgradeErrorLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportAppRouterUpgradeRejectedLogEventconst AppRouterUpgradeRejectedLogEvent: unknownRe-exports logger contracts used by AWS Lambda handlers.Re-exportBuiltPrerenderedRouteconst BuiltPrerenderedRoute: unknownRe-exports build contracts referenced by AWS Lambda handler options.Re-exportRequestHostPolicyconst RequestHostPolicy: unknownRe-exports request and rendering contracts used by AWS Lambda handlers.Re-exportResponseSinkStrategyconst ResponseSinkStrategy: unknownRe-exports request and rendering contracts used by AWS Lambda handlers.Re-exportRouterInstrumentationconst RouterInstrumentation: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterMiddlewareEndInstrumentationEventconst RouterMiddlewareEndInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterMiddlewareInstrumentationEventconst RouterMiddlewareInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterRequestEndInstrumentationEventconst RouterRequestEndInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterRequestInstrumentationEventconst RouterRequestInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterRouteEndInstrumentationEventconst RouterRouteEndInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterRouteInstrumentationEventconst RouterRouteInstrumentationEvent: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.Re-exportRouterTraceContextconst RouterTraceContext: unknownRe-exports router instrumentation hooks and events for AWS Lambda handlers.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.