@bitblit/ratchet-epsilon-common
Version:
Tiny adapter to simplify building API gateway Lambda APIS
8 lines (7 loc) • 343 B
TypeScript
import { Context, ProxyResult } from 'aws-lambda';
export interface EpsilonLambdaEventHandler<T> {
handlesEvent(evt: any): boolean;
extractLabel(evt: T, context: Context): string;
processEvent(evt: T, context: Context): Promise<ProxyResult>;
processUncaughtError?(evt: T, context: Context, err: Error): Promise<ProxyResult>;
}