cdk-nextjs-standalone
Version: 
Deploy a NextJS app to AWS using CDK and OpenNext.
59 lines (58 loc) • 2.19 kB
TypeScript
import type { aws_cloudfront, Duration } from 'aws-cdk-lib';
/**
 * OptionalS3OriginProps
 */
export interface OptionalS3OriginProps {
    /**
     * An optional Origin Access Identity of the origin identity cloudfront will use when calling your s3 bucket.
     * @default - An Origin Access Identity will be created.
     * @stability stable
     */
    readonly originAccessIdentity?: aws_cloudfront.IOriginAccessIdentity;
    /**
     * An optional path that CloudFront appends to the origin domain name when CloudFront requests content from the origin.
     * Must begin, but not end, with '/' (e.g., '/production/images').
     * @default '/'
     * @stability stable
     */
    readonly originPath?: string;
    /**
     * When you enable Origin Shield in the AWS Region that has the lowest latency to your origin, you can get better network performance.
     * @default - origin shield not enabled
     * @stability stable
     */
    readonly originShieldRegion?: string;
    /**
     * Origin Shield is enabled by setting originShieldRegion to a valid region, after this to disable Origin Shield again you must set this flag to false.
     * @default - true
     * @stability stable
     */
    readonly originShieldEnabled?: boolean;
    /**
     * A unique identifier for the origin.
     * This value must be unique within the distribution.
     * @default - an originid will be generated for you
     * @stability stable
     */
    readonly originId?: string;
    /**
     * A list of HTTP header names and values that CloudFront adds to requests it sends to the origin.
     * @default {}
     * @stability stable
     */
    readonly customHeaders?: Record<string, string>;
    /**
     * The number of seconds that CloudFront waits when trying to establish a connection to the origin.
     * Valid values are 1-10 seconds, inclusive.
     * @default Duration.seconds(10)
     * @stability stable
     */
    readonly connectionTimeout?: Duration;
    /**
     * The number of times that CloudFront attempts to connect to the origin;
     * valid values are 1, 2, or 3 attempts.
     * @default 3
     * @stability stable
     */
    readonly connectionAttempts?: number;
}