aws-cdk-image-resize
Version:
AWS CDK construct to easily setup the required arquitecture to serve performant responsive images.
21 lines (20 loc) • 882 B
TypeScript
import * as cloudfront from 'aws-cdk-lib/aws-cloudfront';
import * as lambda from 'aws-cdk-lib/aws-lambda';
import { NodejsFunction, NodejsFunctionProps } from 'aws-cdk-lib/aws-lambda-nodejs';
import * as s3 from 'aws-cdk-lib/aws-s3';
import { Construct } from 'constructs';
import { DistributionProps, FunctionProps } from './types';
export * from './types';
export interface IImageResizeProps {
cloudfrontDistributionProps?: DistributionProps;
originResponseLambdaProps?: NodejsFunctionProps;
s3BucketProps?: s3.BucketProps;
viewerRequestLambdaProps?: FunctionProps;
}
export declare class ImageResize extends Construct {
distribution: cloudfront.Distribution;
imageOriginResponseLambda: NodejsFunction;
imagesBucket: s3.Bucket;
imageViewerRequestLambda: lambda.Function;
constructor(scope: Construct, id: string, props?: IImageResizeProps);
}