UNPKG

@multicloud/sls-aws

Version:

Amazon AWS specific middleware and components for Serverless @multicloud.

37 lines (36 loc) 1.14 kB
import "reflect-metadata"; import { AwsRequest, AwsResponse } from "."; import { CloudContext } from "@multicloud/sls-core"; import { AwsLambdaRuntime } from "./models/awsLamda"; /** * Implementation of Cloud Context for AWS Lambda */ export declare class AwsContext implements CloudContext { /** * Initializes new AwsContext, injects runtime arguments of AWS Lambda. * Sets runtime parameters from original arguments * @param args Runtime arguments for AWS Lambda */ constructor(args: any[]); /** "aws" */ providerType: string; /** Unique identifier for request */ id: string; /** The incoming event source */ event: any; /** HTTP Request */ req: AwsRequest; /** HTTP Response */ res: AwsResponse; /** Original runtime arguments for AWS Lambda */ runtime: AwsLambdaRuntime; /** Signals to the framework that the request is complete */ done: () => void; /** * Send response from AWS Lambda * @param body Body of response * @param status Status code of response */ send(body: any, status?: number): void; flush(): void; }