cdk-nextjs
Version:
Deploy Next.js apps on AWS with CDK
1,489 lines (894 loc) • 448 kB
Markdown
# API Reference <a name="API Reference" id="api-reference"></a>
## Constructs <a name="Constructs" id="Constructs"></a>
### NextjsApi <a name="NextjsApi" id="cdk-nextjs.NextjsApi"></a>
Creates an API Gateway REST API for Next.js applications.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsApi.Initializer"></a>
```typescript
import { NextjsApi } from 'cdk-nextjs'
new NextjsApi(scope: Construct, id: string, props: NextjsApiProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsApi.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsApi.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsApi.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsApiProps">NextjsApiProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsApi.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsApi.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsApi.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsApiProps">NextjsApiProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsApi.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsApi.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsApi.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsApi.isConstruct"></a>
```typescript
import { NextjsApi } from 'cdk-nextjs'
NextjsApi.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsApi.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsApi.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsApi.property.api">api</a></code> | <code>aws-cdk-lib.aws_apigateway.RestApi</code> | The API Gateway REST API. |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsApi.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `api`<sup>Required</sup> <a name="api" id="cdk-nextjs.NextjsApi.property.api"></a>
```typescript
public readonly api: RestApi;
```
- *Type:* aws-cdk-lib.aws_apigateway.RestApi
The API Gateway REST API.
---
### NextjsAssetsDeployment <a name="NextjsAssetsDeployment" id="cdk-nextjs.NextjsAssetsDeployment"></a>
Deploys static assets to S3 and cache assets to EFS in Lambda Custom Resource.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsAssetsDeployment.Initializer"></a>
```typescript
import { NextjsAssetsDeployment } from 'cdk-nextjs'
new NextjsAssetsDeployment(scope: Construct, id: string, props: NextjsAssetsDeploymentProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsAssetsDeploymentProps">NextjsAssetsDeploymentProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsAssetsDeployment.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsAssetsDeploymentProps">NextjsAssetsDeploymentProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsAssetsDeployment.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsAssetsDeployment.isConstruct"></a>
```typescript
import { NextjsAssetsDeployment } from 'cdk-nextjs'
NextjsAssetsDeployment.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsAssetsDeployment.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.customResource">customResource</a></code> | <code>aws-cdk-lib.CustomResource</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsAssetsDeployment.property.dockerImageFunction">dockerImageFunction</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageFunction</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsAssetsDeployment.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `customResource`<sup>Required</sup> <a name="customResource" id="cdk-nextjs.NextjsAssetsDeployment.property.customResource"></a>
```typescript
public readonly customResource: CustomResource;
```
- *Type:* aws-cdk-lib.CustomResource
---
##### `dockerImageFunction`<sup>Required</sup> <a name="dockerImageFunction" id="cdk-nextjs.NextjsAssetsDeployment.property.dockerImageFunction"></a>
```typescript
public readonly dockerImageFunction: DockerImageFunction;
```
- *Type:* aws-cdk-lib.aws_lambda.DockerImageFunction
---
### NextjsBaseConstruct <a name="NextjsBaseConstruct" id="cdk-nextjs.NextjsBaseConstruct"></a>
Base class for all Next.js root constructs.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsBaseConstruct.Initializer"></a>
```typescript
import { NextjsBaseConstruct } from 'cdk-nextjs'
new NextjsBaseConstruct(scope: Construct, id: string, props: NextjsBaseConstructProps, nextjsType: NextjsType)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsBaseConstructProps">NextjsBaseConstructProps</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.nextjsType">nextjsType</a></code> | <code><a href="#cdk-nextjs.NextjsType">NextjsType</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsBaseConstructProps">NextjsBaseConstructProps</a>
---
##### `nextjsType`<sup>Required</sup> <a name="nextjsType" id="cdk-nextjs.NextjsBaseConstruct.Initializer.parameter.nextjsType"></a>
- *Type:* <a href="#cdk-nextjs.NextjsType">NextjsType</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsBaseConstruct.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsBaseConstruct.isConstruct"></a>
```typescript
import { NextjsBaseConstruct } from 'cdk-nextjs'
NextjsBaseConstruct.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsBaseConstruct.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.url">url</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBaseConstruct.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsBaseConstruct.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `url`<sup>Required</sup> <a name="url" id="cdk-nextjs.NextjsBaseConstruct.property.url"></a>
```typescript
public readonly url: string;
```
- *Type:* string
---
##### `nextjsAssetsDeployment`<sup>Required</sup> <a name="nextjsAssetsDeployment" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsAssetsDeployment"></a>
```typescript
public readonly nextjsAssetsDeployment: NextjsAssetsDeployment;
```
- *Type:* <a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a>
---
##### `nextjsBuild`<sup>Required</sup> <a name="nextjsBuild" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsBuild"></a>
```typescript
public readonly nextjsBuild: NextjsBuild;
```
- *Type:* <a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a>
---
##### `nextjsFileSystem`<sup>Required</sup> <a name="nextjsFileSystem" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsFileSystem"></a>
```typescript
public readonly nextjsFileSystem: NextjsFileSystem;
```
- *Type:* <a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a>
---
##### `nextjsPostDeploy`<sup>Required</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsPostDeploy"></a>
```typescript
public readonly nextjsPostDeploy: NextjsPostDeploy;
```
- *Type:* <a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a>
---
##### `nextjsStaticAssets`<sup>Required</sup> <a name="nextjsStaticAssets" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsStaticAssets"></a>
```typescript
public readonly nextjsStaticAssets: NextjsStaticAssets;
```
- *Type:* <a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a>
---
##### `nextjsVpc`<sup>Required</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsBaseConstruct.property.nextjsVpc"></a>
```typescript
public readonly nextjsVpc: NextjsVpc;
```
- *Type:* <a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a>
---
### NextjsBuild <a name="NextjsBuild" id="cdk-nextjs.NextjsBuild"></a>
Builds Next.js assets.
> [https://nextjs.org/docs/pages/api-reference/next-config-js/output](https://nextjs.org/docs/pages/api-reference/next-config-js/output)
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsBuild.Initializer"></a>
```typescript
import { NextjsBuild } from 'cdk-nextjs'
new NextjsBuild(scope: Construct, id: string, props: NextjsBuildProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsBuild.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBuild.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsBuild.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsBuildProps">NextjsBuildProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsBuild.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsBuild.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsBuild.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsBuildProps">NextjsBuildProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsBuild.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsBuild.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsBuild.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsBuild.isConstruct"></a>
```typescript
import { NextjsBuild } from 'cdk-nextjs'
NextjsBuild.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsBuild.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsBuild.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.builderImageAlias">builderImageAlias</a></code> | <code>string</code> | Image alias of builder image Next.js app which is built for other images to be built `FROM`. This image isn't built with CDK Assets construct b/c it doesn't need to be uploaded to ECR. We still need to include slice of `node.addr` in tag in case multiple cdk-nextjs constructs are used. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.buildId">buildId</a></code> | <code>string</code> | Unique id for Next.js build. Used to partition EFS FileSystem. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.buildImageDigest">buildImageDigest</a></code> | <code>string</code> | Hash of builder image which will change whenever the image changes. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.imageForNextjsAssetsDeployment">imageForNextjsAssetsDeployment</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | Docker image built for `NextjsAssetsDeployment`. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.publicDirEntries">publicDirEntries</a></code> | <code><a href="#cdk-nextjs.PublicDirEntry">PublicDirEntry</a>[]</code> | Absolute path to public. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.relativePathToEntrypoint">relativePathToEntrypoint</a></code> | <code>string</code> | The entrypoint JavaScript file used as an argument for Node.js to run the Next.js standalone server relative to the standalone directory. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.imageForNextjsContainers">imageForNextjsContainers</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerImageAsset</code> | Docker image built if using Fargate. |
| <code><a href="#cdk-nextjs.NextjsBuild.property.imageForNextjsFunctions">imageForNextjsFunctions</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageCode</code> | Docker image built if using Lambda. |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsBuild.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `builderImageAlias`<sup>Required</sup> <a name="builderImageAlias" id="cdk-nextjs.NextjsBuild.property.builderImageAlias"></a>
```typescript
public readonly builderImageAlias: string;
```
- *Type:* string
Image alias of builder image Next.js app which is built for other images to be built `FROM`. This image isn't built with CDK Assets construct b/c it doesn't need to be uploaded to ECR. We still need to include slice of `node.addr` in tag in case multiple cdk-nextjs constructs are used.
---
##### `buildId`<sup>Required</sup> <a name="buildId" id="cdk-nextjs.NextjsBuild.property.buildId"></a>
```typescript
public readonly buildId: string;
```
- *Type:* string
Unique id for Next.js build. Used to partition EFS FileSystem.
---
##### `buildImageDigest`<sup>Required</sup> <a name="buildImageDigest" id="cdk-nextjs.NextjsBuild.property.buildImageDigest"></a>
```typescript
public readonly buildImageDigest: string;
```
- *Type:* string
Hash of builder image which will change whenever the image changes.
Useful
for passing to properties of custom resources that depend upon the builder
image to re-run when build image changes.
---
##### `imageForNextjsAssetsDeployment`<sup>Required</sup> <a name="imageForNextjsAssetsDeployment" id="cdk-nextjs.NextjsBuild.property.imageForNextjsAssetsDeployment"></a>
```typescript
public readonly imageForNextjsAssetsDeployment: DockerImageCode;
```
- *Type:* aws-cdk-lib.aws_lambda.DockerImageCode
Docker image built for `NextjsAssetsDeployment`.
---
##### `publicDirEntries`<sup>Required</sup> <a name="publicDirEntries" id="cdk-nextjs.NextjsBuild.property.publicDirEntries"></a>
```typescript
public readonly publicDirEntries: PublicDirEntry[];
```
- *Type:* <a href="#cdk-nextjs.PublicDirEntry">PublicDirEntry</a>[]
Absolute path to public.
Use by CloudFront/ALB to create behaviors/rules
---
*Example*
```typescript
"/Users/john/myapp/public"
```
##### `relativePathToEntrypoint`<sup>Required</sup> <a name="relativePathToEntrypoint" id="cdk-nextjs.NextjsBuild.property.relativePathToEntrypoint"></a>
```typescript
public readonly relativePathToEntrypoint: string;
```
- *Type:* string
The entrypoint JavaScript file used as an argument for Node.js to run the Next.js standalone server relative to the standalone directory.
---
*Example*
```typescript
"./packages/ui/server.js" (monorepo)
```
##### `imageForNextjsContainers`<sup>Optional</sup> <a name="imageForNextjsContainers" id="cdk-nextjs.NextjsBuild.property.imageForNextjsContainers"></a>
```typescript
public readonly imageForNextjsContainers: DockerImageAsset;
```
- *Type:* aws-cdk-lib.aws_ecr_assets.DockerImageAsset
Docker image built if using Fargate.
---
##### `imageForNextjsFunctions`<sup>Optional</sup> <a name="imageForNextjsFunctions" id="cdk-nextjs.NextjsBuild.property.imageForNextjsFunctions"></a>
```typescript
public readonly imageForNextjsFunctions: DockerImageCode;
```
- *Type:* aws-cdk-lib.aws_lambda.DockerImageCode
Docker image built if using Lambda.
---
### NextjsContainers <a name="NextjsContainers" id="cdk-nextjs.NextjsContainers"></a>
Next.js load balanced via Application Load Balancer with containers via AWS Fargate.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsContainers.Initializer"></a>
```typescript
import { NextjsContainers } from 'cdk-nextjs'
new NextjsContainers(scope: Construct, id: string, props: NextjsContainersProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsContainers.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsContainers.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsContainers.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsContainersProps">NextjsContainersProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsContainers.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsContainers.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsContainers.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsContainersProps">NextjsContainersProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsContainers.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsContainers.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsContainers.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsContainers.isConstruct"></a>
```typescript
import { NextjsContainers } from 'cdk-nextjs'
NextjsContainers.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsContainers.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsContainers.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsContainers.property.albFargateService">albFargateService</a></code> | <code>aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsContainers.property.ecsCluster">ecsCluster</a></code> | <code>aws-cdk-lib.aws_ecs.Cluster</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsContainers.property.url">url</a></code> | <code>string</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsContainers.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `albFargateService`<sup>Required</sup> <a name="albFargateService" id="cdk-nextjs.NextjsContainers.property.albFargateService"></a>
```typescript
public readonly albFargateService: ApplicationLoadBalancedFargateService;
```
- *Type:* aws-cdk-lib.aws_ecs_patterns.ApplicationLoadBalancedFargateService
---
##### `ecsCluster`<sup>Required</sup> <a name="ecsCluster" id="cdk-nextjs.NextjsContainers.property.ecsCluster"></a>
```typescript
public readonly ecsCluster: Cluster;
```
- *Type:* aws-cdk-lib.aws_ecs.Cluster
---
##### `url`<sup>Required</sup> <a name="url" id="cdk-nextjs.NextjsContainers.property.url"></a>
```typescript
public readonly url: string;
```
- *Type:* string
---
### NextjsDistribution <a name="NextjsDistribution" id="cdk-nextjs.NextjsDistribution"></a>
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsDistribution.Initializer"></a>
```typescript
import { NextjsDistribution } from 'cdk-nextjs'
new NextjsDistribution(scope: Construct, id: string, props: NextjsDistributionProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsDistribution.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsDistribution.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsDistribution.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsDistributionProps">NextjsDistributionProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsDistribution.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsDistribution.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsDistribution.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsDistributionProps">NextjsDistributionProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsDistribution.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsDistribution.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsDistribution.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsDistribution.isConstruct"></a>
```typescript
import { NextjsDistribution } from 'cdk-nextjs'
NextjsDistribution.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsDistribution.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsDistribution.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsDistribution.property.distribution">distribution</a></code> | <code>aws-cdk-lib.aws_cloudfront.Distribution</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsDistribution.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `distribution`<sup>Required</sup> <a name="distribution" id="cdk-nextjs.NextjsDistribution.property.distribution"></a>
```typescript
public readonly distribution: Distribution;
```
- *Type:* aws-cdk-lib.aws_cloudfront.Distribution
---
### NextjsFileSystem <a name="NextjsFileSystem" id="cdk-nextjs.NextjsFileSystem"></a>
Next.js Network File System enabling sharing of image optimization cache, data cach, and pages cache.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsFileSystem.Initializer"></a>
```typescript
import { NextjsFileSystem } from 'cdk-nextjs'
new NextjsFileSystem(scope: Construct, id: string, props: NextjsFileSystemProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsFileSystem.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFileSystem.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFileSystem.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystemProps">NextjsFileSystemProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsFileSystem.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsFileSystem.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsFileSystem.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsFileSystemProps">NextjsFileSystemProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsFileSystem.toString">toString</a></code> | Returns a string representation of this construct. |
| <code><a href="#cdk-nextjs.NextjsFileSystem.allowCompute">allowCompute</a></code> | *No description.* |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsFileSystem.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
##### `allowCompute` <a name="allowCompute" id="cdk-nextjs.NextjsFileSystem.allowCompute"></a>
```typescript
public allowCompute(__0: AllowComputeProps): void
```
###### `__0`<sup>Required</sup> <a name="__0" id="cdk-nextjs.NextjsFileSystem.allowCompute.parameter.__0"></a>
- *Type:* <a href="#cdk-nextjs.AllowComputeProps">AllowComputeProps</a>
---
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsFileSystem.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsFileSystem.isConstruct"></a>
```typescript
import { NextjsFileSystem } from 'cdk-nextjs'
NextjsFileSystem.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsFileSystem.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsFileSystem.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsFileSystem.property.accessPoint">accessPoint</a></code> | <code>aws-cdk-lib.aws_efs.AccessPoint</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFileSystem.property.fileSystem">fileSystem</a></code> | <code>aws-cdk-lib.aws_efs.FileSystem</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsFileSystem.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `accessPoint`<sup>Required</sup> <a name="accessPoint" id="cdk-nextjs.NextjsFileSystem.property.accessPoint"></a>
```typescript
public readonly accessPoint: AccessPoint;
```
- *Type:* aws-cdk-lib.aws_efs.AccessPoint
---
##### `fileSystem`<sup>Required</sup> <a name="fileSystem" id="cdk-nextjs.NextjsFileSystem.property.fileSystem"></a>
```typescript
public readonly fileSystem: FileSystem;
```
- *Type:* aws-cdk-lib.aws_efs.FileSystem
---
### NextjsFunctions <a name="NextjsFunctions" id="cdk-nextjs.NextjsFunctions"></a>
Run Next.js in functions on AWS with AWS Lambda.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsFunctions.Initializer"></a>
```typescript
import { NextjsFunctions } from 'cdk-nextjs'
new NextjsFunctions(scope: Construct, id: string, props: NextjsFunctionsProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsFunctions.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFunctions.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFunctions.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsFunctionsProps">NextjsFunctionsProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsFunctions.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsFunctions.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsFunctions.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsFunctionsProps">NextjsFunctionsProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsFunctions.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsFunctions.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsFunctions.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsFunctions.isConstruct"></a>
```typescript
import { NextjsFunctions } from 'cdk-nextjs'
NextjsFunctions.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsFunctions.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsFunctions.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsFunctions.property.function">function</a></code> | <code>aws-cdk-lib.aws_lambda.DockerImageFunction</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsFunctions.property.functionUrl">functionUrl</a></code> | <code>aws-cdk-lib.aws_lambda.FunctionUrl</code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsFunctions.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `function`<sup>Required</sup> <a name="function" id="cdk-nextjs.NextjsFunctions.property.function"></a>
```typescript
public readonly function: DockerImageFunction;
```
- *Type:* aws-cdk-lib.aws_lambda.DockerImageFunction
---
##### `functionUrl`<sup>Optional</sup> <a name="functionUrl" id="cdk-nextjs.NextjsFunctions.property.functionUrl"></a>
```typescript
public readonly functionUrl: FunctionUrl;
```
- *Type:* aws-cdk-lib.aws_lambda.FunctionUrl
---
### NextjsGlobalContainers <a name="NextjsGlobalContainers" id="cdk-nextjs.NextjsGlobalContainers"></a>
Deploy Next.js globally distributed with containers. Uses [CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) as Content Delivery Network (CDN) for global distribution and [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) for containers.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsGlobalContainers.Initializer"></a>
```typescript
import { NextjsGlobalContainers } from 'cdk-nextjs'
new NextjsGlobalContainers(scope: Construct, id: string, props: NextjsGlobalContainersProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalContainersProps">NextjsGlobalContainersProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsGlobalContainers.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsGlobalContainersProps">NextjsGlobalContainersProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsGlobalContainers.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsGlobalContainers.isConstruct"></a>
```typescript
import { NextjsGlobalContainers } from 'cdk-nextjs'
NextjsGlobalContainers.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsGlobalContainers.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.url">url</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsContainers">nextjsContainers</a></code> | <code><a href="#cdk-nextjs.NextjsContainers">NextjsContainers</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalContainers.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistribution">NextjsDistribution</a></code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsGlobalContainers.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `url`<sup>Required</sup> <a name="url" id="cdk-nextjs.NextjsGlobalContainers.property.url"></a>
```typescript
public readonly url: string;
```
- *Type:* string
---
##### `nextjsAssetsDeployment`<sup>Required</sup> <a name="nextjsAssetsDeployment" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsAssetsDeployment"></a>
```typescript
public readonly nextjsAssetsDeployment: NextjsAssetsDeployment;
```
- *Type:* <a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a>
---
##### `nextjsBuild`<sup>Required</sup> <a name="nextjsBuild" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsBuild"></a>
```typescript
public readonly nextjsBuild: NextjsBuild;
```
- *Type:* <a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a>
---
##### `nextjsFileSystem`<sup>Required</sup> <a name="nextjsFileSystem" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsFileSystem"></a>
```typescript
public readonly nextjsFileSystem: NextjsFileSystem;
```
- *Type:* <a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a>
---
##### `nextjsPostDeploy`<sup>Required</sup> <a name="nextjsPostDeploy" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsPostDeploy"></a>
```typescript
public readonly nextjsPostDeploy: NextjsPostDeploy;
```
- *Type:* <a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a>
---
##### `nextjsStaticAssets`<sup>Required</sup> <a name="nextjsStaticAssets" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsStaticAssets"></a>
```typescript
public readonly nextjsStaticAssets: NextjsStaticAssets;
```
- *Type:* <a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a>
---
##### `nextjsVpc`<sup>Required</sup> <a name="nextjsVpc" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsVpc"></a>
```typescript
public readonly nextjsVpc: NextjsVpc;
```
- *Type:* <a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a>
---
##### `nextjsContainers`<sup>Required</sup> <a name="nextjsContainers" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsContainers"></a>
```typescript
public readonly nextjsContainers: NextjsContainers;
```
- *Type:* <a href="#cdk-nextjs.NextjsContainers">NextjsContainers</a>
---
##### `nextjsDistribution`<sup>Required</sup> <a name="nextjsDistribution" id="cdk-nextjs.NextjsGlobalContainers.property.nextjsDistribution"></a>
```typescript
public readonly nextjsDistribution: NextjsDistribution;
```
- *Type:* <a href="#cdk-nextjs.NextjsDistribution">NextjsDistribution</a>
---
### NextjsGlobalFunctions <a name="NextjsGlobalFunctions" id="cdk-nextjs.NextjsGlobalFunctions"></a>
Deploy Next.js globally distributed with functions. Uses [CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) as Content Delivery Network (CDN) for global distribution and [AWS Lambda Functions](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) for functions.
#### Initializers <a name="Initializers" id="cdk-nextjs.NextjsGlobalFunctions.Initializer"></a>
```typescript
import { NextjsGlobalFunctions } from 'cdk-nextjs'
new NextjsGlobalFunctions(scope: Construct, id: string, props: NextjsGlobalFunctionsProps)
```
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.props">props</a></code> | <code><a href="#cdk-nextjs.NextjsGlobalFunctionsProps">NextjsGlobalFunctionsProps</a></code> | *No description.* |
---
##### `scope`<sup>Required</sup> <a name="scope" id="cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.scope"></a>
- *Type:* constructs.Construct
---
##### `id`<sup>Required</sup> <a name="id" id="cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.id"></a>
- *Type:* string
---
##### `props`<sup>Required</sup> <a name="props" id="cdk-nextjs.NextjsGlobalFunctions.Initializer.parameter.props"></a>
- *Type:* <a href="#cdk-nextjs.NextjsGlobalFunctionsProps">NextjsGlobalFunctionsProps</a>
---
#### Methods <a name="Methods" id="Methods"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.toString">toString</a></code> | Returns a string representation of this construct. |
---
##### `toString` <a name="toString" id="cdk-nextjs.NextjsGlobalFunctions.toString"></a>
```typescript
public toString(): string
```
Returns a string representation of this construct.
#### Static Functions <a name="Static Functions" id="Static Functions"></a>
| **Name** | **Description** |
| --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
---
##### ~~`isConstruct`~~ <a name="isConstruct" id="cdk-nextjs.NextjsGlobalFunctions.isConstruct"></a>
```typescript
import { NextjsGlobalFunctions } from 'cdk-nextjs'
NextjsGlobalFunctions.isConstruct(x: any)
```
Checks if `x` is a construct.
###### `x`<sup>Required</sup> <a name="x" id="cdk-nextjs.NextjsGlobalFunctions.isConstruct.parameter.x"></a>
- *Type:* any
Any object.
---
#### Properties <a name="Properties" id="Properties"></a>
| **Name** | **Type** | **Description** |
| --- | --- | --- |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.url">url</a></code> | <code>string</code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsAssetsDeployment">nextjsAssetsDeployment</a></code> | <code><a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsBuild">nextjsBuild</a></code> | <code><a href="#cdk-nextjs.NextjsBuild">NextjsBuild</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsFileSystem">nextjsFileSystem</a></code> | <code><a href="#cdk-nextjs.NextjsFileSystem">NextjsFileSystem</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsPostDeploy">nextjsPostDeploy</a></code> | <code><a href="#cdk-nextjs.NextjsPostDeploy">NextjsPostDeploy</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsStaticAssets">nextjsStaticAssets</a></code> | <code><a href="#cdk-nextjs.NextjsStaticAssets">NextjsStaticAssets</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsVpc">nextjsVpc</a></code> | <code><a href="#cdk-nextjs.NextjsVpc">NextjsVpc</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsDistribution">nextjsDistribution</a></code> | <code><a href="#cdk-nextjs.NextjsDistribution">NextjsDistribution</a></code> | *No description.* |
| <code><a href="#cdk-nextjs.NextjsGlobalFunctions.property.nextjsFunctions">nextjsFunctions</a></code> | <code><a href="#cdk-nextjs.NextjsFunctions">NextjsFunctions</a></code> | *No description.* |
---
##### `node`<sup>Required</sup> <a name="node" id="cdk-nextjs.NextjsGlobalFunctions.property.node"></a>
```typescript
public readonly node: Node;
```
- *Type:* constructs.Node
The tree node.
---
##### `url`<sup>Required</sup> <a name="url" id="cdk-nextjs.NextjsGlobalFunctions.property.url"></a>
```typescript
public readonly url: string;
```
- *Type:* string
---
##### `nextjsAssetsDeployment`<sup>Required</sup> <a name="nextjsAssetsDeployment" id="cdk-nextjs.NextjsGlobalFunctions.property.nextjsAssetsDeployment"></a>
```typescript
public readonly nextjsAssetsDeployment: NextjsAssetsDeployment;
```
- *Type:* <a href="#cdk-nextjs.NextjsAssetsDeployment">NextjsAssetsDeployment</a>
---
##### `nextjsBuild`<sup>Required</sup> <a name="nextjsBuild" id="cdk-nextjs.NextjsGlobalFunctions.property.nextjsBuild"></a>
```typescript
public readonly nextjsBuild: Next