cdk-nextjs
Version:
Deploy Next.js apps on AWS with CDK
46 lines (45 loc) • 1.45 kB
TypeScript
import type { aws_certificatemanager, aws_cloudfront, aws_elasticloadbalancingv2, aws_lambda, aws_s3 } from 'aws-cdk-lib';
import type { NextjsType, PublicDirEntry } from '../';
/**
* OptionalNextjsDistributionProps
*/
export interface OptionalNextjsDistributionProps {
/**
* Required if `NextjsType.GLOBAL_CONTAINERS` or `NextjsType.REGIONAL_CONTAINERS`.
* @stability stable
*/
readonly loadBalancer?: aws_elasticloadbalancingv2.ApplicationLoadBalancer;
/**
* Required if `NextjsType.GLOBAL_FUNCTIONS`.
* @stability stable
*/
readonly functionUrl?: aws_lambda.IFunctionUrl;
/**
* @stability stable
*/
readonly distribution?: aws_cloudfront.Distribution;
/**
* Optional but only applicable for `NextjsType.GLOBAL_CONTAINERS`.
* @stability stable
*/
readonly certificate?: aws_certificatemanager.ICertificate;
/**
* @stability stable
*/
readonly basePath?: string;
/**
* Entries (files/directories) within Next.js app's public directory. Used to add static behaviors to distribution.
* @stability stable
*/
readonly publicDirEntries?: Array<PublicDirEntry>;
/**
* @stability stable
*/
readonly nextjsType?: NextjsType;
/**
* Bucket containing static assets.
* Must be provided if you want to serve static files.
* @stability stable
*/
readonly assetsBucket?: aws_s3.IBucket;
}