@cpmech/az-cdk
Version:
AmaZon AWS-CDK tools
42 lines (41 loc) • 1.23 kB
TypeScript
import { Construct, Duration } from '@aws-cdk/core';
import { Runtime } from '@aws-cdk/aws-lambda';
import { Iany } from '@cpmech/basic';
import { ILayer } from './LambdaLayersConstruct';
export interface ILambdaApiSpec {
filenameKey: string;
handlerName: string;
httpMethods: string[];
route: string;
subroute?: string;
unprotected?: boolean;
extraPermissions?: string[];
accessDynamoTables?: string[];
accessBuckets?: string[];
envars?: Iany;
timeout?: Duration;
memorySize?: number;
runtime?: Runtime;
dirDist?: string;
layers?: string[];
noCommonLayers?: boolean;
}
export interface ICustomApiDomainName {
prefixedDomain: string;
certificateArn: string;
r53HostedZoneId: string;
apiRegion?: string;
}
export interface ILambdaApiProps {
gatewayName: string;
lambdas: ILambdaApiSpec[];
cognitoPoolId?: string;
customDomain?: ICustomApiDomainName;
useLayers?: boolean;
dirLayers?: string;
specLayers?: ILayer[];
}
export declare class LambdaApiConstruct extends Construct {
readonly apiUrl: string;
constructor(scope: Construct, id: string, props: ILambdaApiProps);
}