cdk-nextjs 0.5.0-beta.4 → 0.5.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +425 -123
- package/.jsii.tabl.json +1 -1
- package/API.md +602 -39
- package/README.md +77 -0
- package/docs/breaking-changes.md +20 -0
- package/lib/generated-structs/OptionalNextjsCacheProps.d.ts +18 -0
- package/lib/generated-structs/OptionalNextjsCacheProps.js +1 -2
- package/lib/generated-structs/OptionalNextjsContainersProps.d.ts +19 -2
- package/lib/generated-structs/OptionalNextjsContainersProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsDistributionProps.d.ts +1 -1
- package/lib/generated-structs/OptionalNextjsDistributionProps.js +1 -1
- package/lib/generated-structs/OptionalNextjsPostDeployProps.d.ts +2 -2
- package/lib/generated-structs/OptionalNextjsPostDeployProps.js +1 -1
- package/lib/nextjs-api.js +1 -1
- package/lib/nextjs-build/global-containers.Dockerfile +2 -1
- package/lib/nextjs-build/nextjs-build.js +1 -1
- package/lib/nextjs-build/regional-containers.Dockerfile +2 -1
- package/lib/nextjs-cache.d.ts +15 -2
- package/lib/nextjs-cache.js +5 -4
- package/lib/nextjs-compute/nextjs-compute-base-props.d.ts +2 -2
- package/lib/nextjs-compute/nextjs-compute-base-props.js +1 -1
- package/lib/nextjs-compute/nextjs-containers.d.ts +30 -2
- package/lib/nextjs-compute/nextjs-containers.js +80 -12
- package/lib/nextjs-compute/nextjs-functions.js +1 -1
- package/lib/nextjs-distribution.d.ts +2 -2
- package/lib/nextjs-distribution.js +2 -2
- package/lib/nextjs-post-deploy.d.ts +4 -4
- package/lib/nextjs-post-deploy.js +2 -2
- package/lib/nextjs-static-assets.d.ts +8 -2
- package/lib/nextjs-static-assets.js +3 -3
- package/lib/root-constructs/nextjs-base-construct.d.ts +22 -0
- package/lib/root-constructs/nextjs-base-construct.js +5 -2
- package/lib/root-constructs/nextjs-global-containers.d.ts +14 -0
- package/lib/root-constructs/nextjs-global-containers.js +4 -2
- package/lib/root-constructs/nextjs-global-functions.js +1 -1
- package/lib/root-constructs/nextjs-regional-containers.d.ts +14 -0
- package/lib/root-constructs/nextjs-regional-containers.js +5 -3
- package/lib/root-constructs/nextjs-regional-functions.js +1 -1
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -8667,7 +8667,7 @@
|
|
|
8667
8667
|
},
|
|
8668
8668
|
"name": "cdk-nextjs",
|
|
8669
8669
|
"readme": {
|
|
8670
|
-
"markdown": "\n[](https://www.npmjs.org/package/cdk-nextjs)\n\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nDeploy [Next.js](https://nextjs.org/) apps on [AWS](https://aws.amazon.com/) with the [AWS CDK](https://aws.amazon.com/cdk/).\n\n## Features\n\n- Supports all features of Next.js App and Pages Router for [Node.js Runtime](https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#nodejs-runtime).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`, `NextjsRegionalFunctions`.\n- Global Content Delivery Network (CDN) built with [Amazon CloudFront](https://aws.amazon.com/cloudfront/) to deliver content with low latency and high transfer speeds.\n- Serverless functions powered by [AWS Lambda](https://aws.amazon.com/lambda/) or serverless containers powered by [AWS Fargate](https://aws.amazon.com/fargate/).\n- Static assets (JS, CSS, public folder) are stored and served from [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) for all constructs (except `NextjsRegionalContainers`) to decrease latency and reduce compute costs by serving directly from S3.\n- [Optimized images](https://nextjs.org/docs/pages/building-your-application/optimizing/images), [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), and [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache) are shared across compute with [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) with supporting metadata in [Amazon DynamoDB](https://aws.amazon.com/dynamodb).\n- Customize every construct via `overrides`.\n- AWS security and operational best practices are utilized, guided by [cdk-nag](https://github.com/cdklabs/cdk-nag).\n- First class support for [monorepos](https://monorepo.tools/).\n- [AWS GovCloud (US)](https://aws.amazon.com/govcloud-us) compatible with `NextjsRegionalFunctions` and `NextjsRegionalContainers`.\n\n## Prerequisites\n\n- Next.js app running v16.2 or higher. If you don't have one yet - follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n- [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app either in the same package or separate package. cdk-nextjs supports monorepos.\n- Docker compatible container engine - we recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby).\n- [Node.js](https://nodejs.org/en) v24 (or LTS)\n\n## Getting Started\n\n1. Install `cdk-nextjs` in the package(s) containing your CDK and Next.js app with `npm i cdk-nextjs`\n2. Update next.config.ts to include `experimental.adapterPath`:\n\n```ts\nimport { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n```\n\n3. Deploy your Next.js app to AWS: `cdk deploy`. Make sure you have [AWS credentials](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-configure.html) configured.\n4. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\n\n### cdk-nextjs Created Dockerfile\n\ncdk-nextjs will generate a Dockerfile in your Next.js app's directory. cdk-nextjs does not have the ability to clean up the Dockerfile after the container is built so you can either add it to source control or gitignore it. When detectd, cdk-nextjs will not overwrite this Dockerfile so you're free to customize it.\n\n## Basic Example CDK App\n\n```ts\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n```\n\nSee [examples/](./examples/) for more usage examples.\n\n## Configuration\n\ncdk-nextjs supports configuration via environment variables. These are automatically set by the construct during deployment, but you can override them for custom behavior.\n\n### Cache Configuration\n\n#### `CDK_NEXTJS_MEMORY_CACHE_TTL_MS`\n\nTime to live in milliseconds for in-memory cache entries. After this duration, entries expire and are removed from the cache.\n\n**Important**: Due to the distributed nature of compute instances (Lambda functions, ECS Fargate containers, etc.), the memory cache by default provides eventual consistency across instances. Tag revalidations will clear the cache on the instance that processes the revalidation, but other instances may serve stale data until their cache entries expire. If you require strong consistency, set this to `0` to disable the memory cache (all requests will fall through to S3 + DynamoDB).\n\n**Default**: `3600000` (1 hour)\n\n**Examples**:\n\n- Short TTL (5 minutes): `300000` - for frequently changing data\n- Medium TTL (1 hour): `3600000` - balanced between freshness and performance\n- Long TTL (24 hours): `86400000` - for mostly static content\n\n**Trade-offs**:\n\n- Lower values: More cache misses, fresher data, higher S3/DynamoDB costs\n- Higher values: Fewer cache misses, better performance, but longer stale data windows\n\n#### `CDK_NEXTJS_MEMORY_CACHE_MAX_ENTRIES`\n\nMaximum number of cache entries to store in memory. When this limit is reached, the least recently used (LRU) entry is evicted.\n\n**Default**: `1000`\n\n**Examples**:\n\n- Small cache: `100` - minimal memory footprint for simple apps\n- Medium cache: `1000` - good balance for typical applications\n- Large cache: `10000` - for high-traffic apps with many unique pages\n\n**Trade-offs**:\n\n- Lower values: Less memory usage, more cache evictions\n- Higher values: More memory usage, fewer cache evictions, better hit rates\n\n**Memory considerations**: Each entry stores the full cache value (HTML, JSON, etc.). A typical page cache might be 10-100KB, so 1000 entries ≈ 10-100MB of memory. Consider your compute environment's memory limits (Lambda: 128MB-10GB, Fargate: 512MB-30GB) and size accordingly.\n\n### Infrastructure Configuration\n\nThe following environment variables are automatically set by the construct and typically don't need to be modified:\n\n#### `CDK_NEXTJS_BUILD_ID`\n\nUnique identifier for the Next.js build. Used for cache isolation between deployments.\n\n#### `CDK_NEXTJS_CACHE_BUCKET_NAME`\n\nS3 bucket name for storing cached data (optimized images, data cache, full route cache).\n\n#### `CDK_NEXTJS_REVALIDATION_TABLE_NAME`\n\nDynamoDB table name for tracking cache revalidations and tag-to-cache-key mappings.\n\n#### `DEBUG`\n\nSet to `cdk-nextjs:*` to set debug logs. This is especially useful to see cache handler activity.\n\n## Architecture\n\n### `NextjsGlobalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this construct when you have unpredictable traffic, can afford occasional latency (i.e. cold starts - [typically 1% of production traffic](https://aws.amazon.com/blogs/compute/operating-lambda-performance-optimization-part-1/)), and/or want the most granular pricing model. ([code](./src/root-constructs/nextjs-global-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n### `NextjsGlobalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this option when you have predictable traffic, need the lowest latency, and/or can afford a less granular pricing model. ([code](./src/root-constructs/nextjs-global-containers.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/) to regionally serve requests. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-containers.ts#L41))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [API Gateway REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html) to regionally serve requests and distribute static assets. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service apigateway(server)[API Gateway REST API] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:apigateway\n apigateway:R --> L:s3static\n apigateway:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n## Why\n\nThe simplest path to deploy Next.js is on [Vercel](https://vercel.com/) - the Platform-as-a-Service company behind Next.js. However, deploying to Vercel can be expensive and some developers want all of their workloads running _directly_ on AWS. Developers can deploy Next.js on AWS through [AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-Amplifysupport.html), but Amplify does not support all Next.js features and manages AWS resources for you so they cannot be customized. If Amplify meets your requirements we recommend you use it, but if you want to use all Next.js features or want more visibility into the AWS resources then this construct is for you.\n\n## Design Principles\n\n- Treat Next.js as black box. Minimize reliance on Next.js internal APIs to reduce chance of incompatibility between this construct and future versions of Next.js.\n- Security first.\n- One architecture does not fit all.\n- Enable customization everywhere.\n\n## Limitations\n\n- If using `NextjsGlobalFunctions` or `NextjsGlobalContainers` (which use CloudFront), the number of top level files/directories cannot exceed 25, the max number of behaviors a CloudFront Distribution supports. We recommend you put all of your public assets into one top level directory (i.e. public/static) so you don't reach this limit. See [CloudFront Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) for more information.\n- If using `NextjsGlobalFunctions`, when [revalidating data in Next.js](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#on-demand-revalidation) (i.e. [revalidatePath](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)), the CloudFront Cache will still hold stale data. You'll need to use AWS SDK JS V3 [CreateInvalidationCommand](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudfront/Class/CreateInvalidationCommand/) to manually invalidate the path in CloudFront. See more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html).\n- If using `NextjsGlobalFunctions`, setting an Authorization header won't work by default because of Lambda Function URL with IAM Auth is already using the Authorization header. You can use the `AWS_LWA_AUTHORIZATION_SOURCE` environment variable of [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to set an alternative Authorization header in the client which will then be set to the Authorization header when it reaches your app.\n- `NextjsRegionalFunctions` doesn't support streaming because API Gateway doesn't support streaming yet.\n- If using `NextjsRegionalFunctions` without a custom domain, API Gateway REST APIs require a [stage name](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html) (default: `/prod`) to be specified. This causes links to pages and static assets to break because they're not prefixed with the stage name. You can work around this issue by specifying [basePath](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath) in next.config.js as your stage name. Additionally, you'll need to add middleware logic to rewrite requests to include the stage name because API Gateway does not include the stage name in the path passed to Lambda. See [examples/app-playground/middleware.ts](./examples/app-playground/middleware.ts).\n\n## Additional Security Recommendations\n\nThis construct by default implements all AWS security best practices that a CDK construct library reasonably can considering cost and complexity. Below are additional security practices we recommend you implement within your CDK app. Please see them below:\n\n- [VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html). See [examples/](./examples) for sample implementation.\n- [Scan ECR Images For Vulnerabilities](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html).\n- For `NextjsGlobalFunctions` and `NextjsGlobalContainers`, [CloudFront Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html). See [examples/](./examples) for sample implementation.\n- For `NextjsGlobalContainers` and `NextjsRegionalContainers`, use [ALB HTTPS Listener](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)\n- If using `NextjsGlobalContainers` and `NextjsRegionalContainers`, enable `ReadonlyRootFilesystem`. This will remove ability to use Static On-Demand feature of Next.js so it's not enabled by default, but is recommended for security.\n\n## Estimated Costs\n\n### Assumptions\n\nThe following basic assumptions were used for a typical medium Next.js app. See [docs/usage.xlsx](./docs/usage.xlsx) for detailed assumptions and usage per construct type that you can plug into AWS Pricing Calculator.\n\n| Metric | Value |\n| ------------------------------------------------------------ | ----- |\n| Monthly Active Users | 1K |\n| Pages Visited Per Month Per User | 100 |\n| Avg Request Size | 50KB |\n| Static Requests Per Page (js, css, etc) | 15 |\n| Static Requests Cache Hit % | 50% |\n| Static Assets Size | 10GB |\n| Dynamic Requests Per Page (document, optimized images, etc.) | 5 |\n| Dynamic Cache Read % | 50% |\n| Dynamic Cache Write % | 5% |\n| Dynamic Cache Data Size | 10GB |\n| Average Dynamic Cache Request Size | 100KB |\n| Dynamic Revalidate Tag % | 1% |\n\nMore Details:\n\n- Assume ARM architecture for compute\n- AWS Region: us-east-1\n- Excludes charges related to: CloudWatch Logs, NAT Gateway data processing\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=23611f6fea87ef05d5fe87c33135ddde43b17a98)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ---------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $8.09 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=02f0073e612d1eee2a7ccace2c636adc5f0acab7)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------- | ---------------------------- |\n| ECS Fargate | 1 task (1 vCPU, 2 GB) | $28.44 |\n| ALB | 1 LB, 1.04GB/hr, 5.79 conn/sec | $22.50 |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $121.25 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=e214abe60eb4e24fc5866d07ef4355393261af3c)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ------------------------------------------ | ---------------------------- |\n| ECS Fargate | 1 task (2 vCPU, 4 GB), always on | $28.44 |\n| ALB | 1 LB, 4.17 GB/hr, 23.15 conn/sec | $40.78 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $139.00 |\n\n### NextjsRegionalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=60da38c7993c1baeee2fee4bd19ba6441608bb15)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| API Gateway | 2M requests | $7.00 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $11.08 |\n\n## Performance\n\n[Artillery Playwright](https://www.artillery.io/docs/reference/engines/playwright#overview) app playground example load tests results with 1K concurrent users. Reproduce with `pnpm test-fargate:lg` within `examples/load-tests`.\n\n### NextjsGlobalFunctions\n\n<details>\n<summary>`NextjsGlobalFunctions` Performance Details</summary>\n\n```bash\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr:\n min: ......................................................................... 6.3\n max: ......................................................................... 5017.4\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 22.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/1:\n min: ......................................................................... 3.2\n max: ......................................................................... 560.6\n mean: ........................................................................ 9.4\n median: ...................................................................... 5.4\n p95: ......................................................................... 11.1\n p99: ......................................................................... 162.4\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/2:\n min: ......................................................................... 3.1\n max: ......................................................................... 1511.9\n mean: ........................................................................ 9.2\n median: ...................................................................... 5.2\n p95: ......................................................................... 10.7\n p99: ......................................................................... 149.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/3:\n min: ......................................................................... 3.4\n max: ......................................................................... 131.1\n mean: ........................................................................ 7.1\n median: ...................................................................... 5.3\n p95: ......................................................................... 10.1\n p99: ......................................................................... 64.7\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.1\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg/3:\n min: ......................................................................... 2.9\n max: ......................................................................... 98\n mean: ........................................................................ 5.1\n median: ...................................................................... 4.6\n p95: ......................................................................... 8.2\n p99: ......................................................................... 12.8\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr:\n min: ......................................................................... 6.4\n max: ......................................................................... 5018.6\n mean: ........................................................................ 11.3\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr/2:\n min: ......................................................................... 83.4\n max: ......................................................................... 150.7\n mean: ........................................................................ 119\n median: ...................................................................... 111.1\n p95: ......................................................................... 147\n p99: ......................................................................... 147\nbrowser.page.TTFB.https://abc123.cloudfront.net/streaming:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.2\n mean: ........................................................................ 11.8\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\n```\n\n</details>\n\n\n\n### NextjsGlobalContainers\n\n<details>\n<summary>`NextjsGlobalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n### NextjsRegionalContainers\n\n<details>\n<summary>`NextjsRegionalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n### NextjsRegionalFunctions\n\n<details>\n<summary>`NextjsRegionalFunctions` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n## Guides\n\n- [Caching Guide](./docs/caching-guide.md)\n- [Pruning Guide](./docs/pruning-guide.md)\n- [Next Build Output Guide](./docs/next-build-output-guide.ts)\n- [Development Guide](./docs/development-guide.ts)\n\n## Contributing\n\nSteps to build locally:\n\n1. `git clone https://github.com/cdklabs/cdk-nextjs.git`\n2. `cd cdk-nextjs`\n3. `pnpm i && pnpm compile && pnpm build`\n\nThis project uses Projen, so make sure to not edit [Projen](https://projen.io/) created files and only edit .projenrc.ts.\n\n## FAQ\n\nQ: How does this compare to [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs)?<br/>\nA: cdk-nextjs-standalone relies on [OpenNext](https://github.com/sst/open-next). OpenNext injects custom code to interact with private Next.js APIs. While OpenNext is able to make some optimizations that are great for serverless environments, this comes at an increase maintenance cost and increased chances for breaking changes. A goal of cdk-nextjs is to customize Next.js as little as possible to reduce the maintenance burden and decrease chances of breaking changes.\n\nQ: Why does cdk-nextjs depend upon Next.js v16.2 or higher?\nA: This version is required for [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath#image-optimization-caching) so that cdk-nextjs can depend upon public Next.js API.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: See [Caching Guide](./docs/caching-guide.md)\n\nQ: How customizable is the `cdk-nextjs` package for different use cases?<br/>\nA: The `cdk-nextjs` package offers deep customization through _prop-based_ overrides. These can be accessed in the construct props, allowing you to override settings like VPC configurations, CloudFront distribution, and ECS/Fargate setup. For example, you can modify `nextjsBuildProps` to customize the build process or use `nextjsDistributionProps` to adjust how CloudFront handles caching and routing. This level of control makes it easy to adapt the infrastructure to your application’s specific performance, networking, or deployment needs.\n\nQ: How can I use a custom domain with `cdk-nextjs`?<br/>\nA: See [low-cost example](./examples/low-cost/app.ts).\n\nQ: What is difference between `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` and `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps`<br/>\nA: `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` allows you to customize any construct's props _within_ `NextjsDistribution` and is likely what you want whereas `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps` allows you to customize the props passed into the construct: `NextjsDistribution`. This principle also applies to other similarly named overrides.\n\nQ: Why use container image for `NextjsGlobalFunctions`?<br />\nA: Read [The case for containers on Lambda (with benchmarks)](https://aaronstuyvenberg.com/posts/containers-on-lambda). Also, we depend upon [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to transform lambda event payloads into HTTP requests that Next.js expects.\n\nQ: How can I `cdk bootstrap --cloudformation-execution-policies ...` my AWS Account with limited permissions for cdk-nextjs to deploy?<br />\nA: See [docs/cdk-nextjs-cfn-exec-policy.json](./docs/cdk-nextjs-cfn-exec-policy.json). Note, this IAM Policy is scoped to all cdk-nextjs constructs so you can remove services if you know the construct you're using doesn't use that service.\n\n## Acknowledgements\n\nThis construct was built on the shoulders of giants. Thank you to the contributors of [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs) and [open-next](https://github.com/sst/open-next).\n\n## 🥂 Thanks Contributors\n\nThank you for helping other developers deploy Next.js apps on AWS\n\n<a href=\"https://github.com/cdklabs/cdk-nextjs/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=cdklabs/cdk-nextjs\" />\n</a>\n"
|
|
8670
|
+
"markdown": "\n[](https://www.npmjs.org/package/cdk-nextjs)\n\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nDeploy [Next.js](https://nextjs.org/) apps on [AWS](https://aws.amazon.com/) with the [AWS CDK](https://aws.amazon.com/cdk/).\n\n## Features\n\n- Supports all features of Next.js App and Pages Router for [Node.js Runtime](https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#nodejs-runtime).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`, `NextjsRegionalFunctions`.\n- Global Content Delivery Network (CDN) built with [Amazon CloudFront](https://aws.amazon.com/cloudfront/) to deliver content with low latency and high transfer speeds.\n- Serverless functions powered by [AWS Lambda](https://aws.amazon.com/lambda/) or serverless containers powered by [AWS Fargate](https://aws.amazon.com/fargate/).\n- Static assets (JS, CSS, public folder) are stored and served from [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) for all constructs (except `NextjsRegionalContainers`) to decrease latency and reduce compute costs by serving directly from S3.\n- [Optimized images](https://nextjs.org/docs/pages/building-your-application/optimizing/images), [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), and [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache) are shared across compute with [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) with supporting metadata in [Amazon DynamoDB](https://aws.amazon.com/dynamodb).\n- Customize every construct via `overrides`.\n- AWS security and operational best practices are utilized, guided by [cdk-nag](https://github.com/cdklabs/cdk-nag).\n- First class support for [monorepos](https://monorepo.tools/).\n- [Bring Your Own Resources](#bring-your-own-resources) — import existing AWS resources (CloudFront distributions, ECS clusters, ALBs, S3 buckets, DynamoDB tables).\n- [AWS GovCloud (US)](https://aws.amazon.com/govcloud-us) compatible with `NextjsRegionalFunctions` and `NextjsRegionalContainers`.\n\n## Prerequisites\n\n- Next.js app running v16.2 or higher. If you don't have one yet - follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n- [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app either in the same package or separate package. cdk-nextjs supports monorepos.\n- Docker compatible container engine - we recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby).\n- [Node.js](https://nodejs.org/en) v24 (or LTS)\n\n## Getting Started\n\n1. Install `cdk-nextjs` in the package(s) containing your CDK and Next.js app with `npm i cdk-nextjs`\n2. Update next.config.ts to include `experimental.adapterPath`:\n\n```ts\nimport { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n```\n\n3. Deploy your Next.js app to AWS: `cdk deploy`. Make sure you have [AWS credentials](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-configure.html) configured.\n4. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\n\n### cdk-nextjs Created Dockerfile\n\ncdk-nextjs will generate a Dockerfile in your Next.js app's directory. cdk-nextjs does not have the ability to clean up the Dockerfile after the container is built so you can either add it to source control or gitignore it. When detectd, cdk-nextjs will not overwrite this Dockerfile so you're free to customize it.\n\n## Basic Example CDK App\n\n```ts\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n```\n\nSee [examples/](./examples/) for more usage examples.\n\n## Configuration\n\ncdk-nextjs supports configuration via environment variables. These are automatically set by the construct during deployment, but you can override them for custom behavior.\n\n### Cache Configuration\n\n#### `CDK_NEXTJS_MEMORY_CACHE_TTL_MS`\n\nTime to live in milliseconds for in-memory cache entries. After this duration, entries expire and are removed from the cache.\n\n**Important**: Due to the distributed nature of compute instances (Lambda functions, ECS Fargate containers, etc.), the memory cache by default provides eventual consistency across instances. Tag revalidations will clear the cache on the instance that processes the revalidation, but other instances may serve stale data until their cache entries expire. If you require strong consistency, set this to `0` to disable the memory cache (all requests will fall through to S3 + DynamoDB).\n\n**Default**: `3600000` (1 hour)\n\n**Examples**:\n\n- Short TTL (5 minutes): `300000` - for frequently changing data\n- Medium TTL (1 hour): `3600000` - balanced between freshness and performance\n- Long TTL (24 hours): `86400000` - for mostly static content\n\n**Trade-offs**:\n\n- Lower values: More cache misses, fresher data, higher S3/DynamoDB costs\n- Higher values: Fewer cache misses, better performance, but longer stale data windows\n\n#### `CDK_NEXTJS_MEMORY_CACHE_MAX_ENTRIES`\n\nMaximum number of cache entries to store in memory. When this limit is reached, the least recently used (LRU) entry is evicted.\n\n**Default**: `1000`\n\n**Examples**:\n\n- Small cache: `100` - minimal memory footprint for simple apps\n- Medium cache: `1000` - good balance for typical applications\n- Large cache: `10000` - for high-traffic apps with many unique pages\n\n**Trade-offs**:\n\n- Lower values: Less memory usage, more cache evictions\n- Higher values: More memory usage, fewer cache evictions, better hit rates\n\n**Memory considerations**: Each entry stores the full cache value (HTML, JSON, etc.). A typical page cache might be 10-100KB, so 1000 entries ≈ 10-100MB of memory. Consider your compute environment's memory limits (Lambda: 128MB-10GB, Fargate: 512MB-30GB) and size accordingly.\n\n### Infrastructure Configuration\n\nThe following environment variables are automatically set by the construct and typically don't need to be modified:\n\n#### `CDK_NEXTJS_BUILD_ID`\n\nUnique identifier for the Next.js build. Used for cache isolation between deployments.\n\n#### `CDK_NEXTJS_CACHE_BUCKET_NAME`\n\nS3 bucket name for storing cached data (optimized images, data cache, full route cache).\n\n#### `CDK_NEXTJS_REVALIDATION_TABLE_NAME`\n\nDynamoDB table name for tracking cache revalidations and tag-to-cache-key mappings.\n\n#### `DEBUG`\n\nSet to `cdk-nextjs:*` to set debug logs. This is especially useful to see cache handler activity.\n\n## Architecture\n\n### `NextjsGlobalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this construct when you have unpredictable traffic, can afford occasional latency (i.e. cold starts - [typically 1% of production traffic](https://aws.amazon.com/blogs/compute/operating-lambda-performance-optimization-part-1/)), and/or want the most granular pricing model. ([code](./src/root-constructs/nextjs-global-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n### `NextjsGlobalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this option when you have predictable traffic, need the lowest latency, and/or can afford a less granular pricing model. ([code](./src/root-constructs/nextjs-global-containers.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/) to regionally serve requests. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-containers.ts#L41))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [API Gateway REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html) to regionally serve requests and distribute static assets. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service apigateway(server)[API Gateway REST API] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:apigateway\n apigateway:R --> L:s3static\n apigateway:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n## Why\n\nThe simplest path to deploy Next.js is on [Vercel](https://vercel.com/) - the Platform-as-a-Service company behind Next.js. However, deploying to Vercel can be expensive and some developers want all of their workloads running _directly_ on AWS. Developers can deploy Next.js on AWS through [AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-Amplifysupport.html), but Amplify does not support all Next.js features and manages AWS resources for you so they cannot be customized. If Amplify meets your requirements we recommend you use it, but if you want to use all Next.js features or want more visibility into the AWS resources then this construct is for you.\n\n## Design Principles\n\n- Treat Next.js as black box. Minimize reliance on Next.js internal APIs to reduce chance of incompatibility between this construct and future versions of Next.js.\n- Security first.\n- One architecture does not fit all.\n- Enable customization everywhere.\n\n## Bring Your Own Resources\n\ncdk-nextjs supports importing existing AWS resources instead of creating new ones. This is especially useful for per-branch (MR/PR) environments where you deploy shared infrastructure once and spin up lightweight branch stacks that reuse it.\n\n### Supported Resources\n\n| Resource | Prop | Available On |\n| --------------------------- | -------------------- | ---------------------------------------------------- |\n| S3 Cache Bucket | `cacheBucket` | All constructs |\n| DynamoDB Revalidation Table | `revalidationTable` | All constructs |\n| S3 Static Assets Bucket | `staticAssetsBucket` | All constructs |\n| CloudFront Distribution | `distribution` | `NextjsGlobalFunctions`, `NextjsGlobalContainers` |\n| ECS Cluster | `ecsCluster` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n| ALB | `alb` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n\n### Resource Isolation\n\n- **Cache bucket and DynamoDB table** are isolated by `buildId` prefix. Multiple branches safely share one bucket/table with no conflicts.\n- **Static assets bucket** — Next.js includes content hashes in static asset filenames, so different branches deploying the same file will produce identical content. It's safe for branches to overwrite each other. If you're already using `basePath` for routing, assets will naturally be prefixed by it.\n\n### Shared ALB and `removeAutoCreatedListener()`\n\n`ApplicationLoadBalancedFargateService` always creates a listener on port 80 — there is no opt-out. When you import an ALB that already has a listener on that port, the duplicate causes a deployment failure. Since CDK doesn't expose a way to prevent this, `removeAutoCreatedListener()` surgically removes the generated CloudFormation resources: the `CfnListener`, its security group ingress rule, rebuilds the ECS service `DependsOn` without the deleted listener, and removes auto-created `CfnOutput` resources:\n\n```ts\nconst nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();\n```\n\n### Examples\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a complete deployable example with shared infrastructure and per-branch host-header routing.\n\n## Preview Environments (Per-Branch Deployments)\n\ncdk-nextjs can deploy ephemeral preview environments per merge request (MR) or pull request (PR). The recommended approach uses subdomain-based routing (`pr-123.app.example.com`) so each preview environment runs the same Next.js build as production — no `basePath` configuration or separate builds required.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a fully deployable example using `NextjsRegionalContainers` with a shared ALB, ECS Cluster, S3 buckets, and DynamoDB table — connected via SSM Parameter Store.\n\n### Prerequisites\n\n- Wildcard DNS record: `*.app.example.com` → your routing layer (ALB, CloudFront, API Gateway)\n- Wildcard ACM certificate: `*.app.example.com`\n\n### Per-Architecture Recommendations\n\n#### `NextjsGlobalContainers` and `NextjsRegionalContainers` (ALB-based)\n\nSubdomain routing via ALB host-based listener rules. This is the fastest and simplest approach. For `NextjsGlobalContainers`, CloudFront forwards the `Host` header to the ALB origin, so the ALB handles all branch routing — no CloudFront changes needed per branch.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for the full implementation.\n\n#### `NextjsRegionalFunctions` (API Gateway)\n\nSubdomain routing via API Gateway custom domain mappings.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a cdk-nextjs stack that imports shared resources and creates its own API Gateway\n3. Create an API Gateway custom domain (`pr-123.app.example.com`) mapped to the branch's API stage\n4. Tear down the branch stack on MR close\n\n#### `NextjsGlobalFunctions` (Lambda + CloudFront)\n\nRequires a separate cdk-nextjs stack per branch, each with its own CloudFront distribution. CloudFront cannot route to different Lambda Function URL origins based on the `Host` header — origin selection is determined by cache behavior path patterns, not request headers.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a full cdk-nextjs stack that imports shared resources (`cacheBucket`, `revalidationTable`, `staticAssetsBucket`) but creates its own CloudFront distribution and Lambda function\n3. Point `pr-123.app.example.com` DNS to the branch's CloudFront distribution\n4. Tear down the branch stack on MR close\n\nNote: CloudFront distributions take several minutes to create/update, so this architecture has the slowest preview environment spin-up time.\n\n## Limitations\n\n- If using `NextjsGlobalFunctions` or `NextjsGlobalContainers` (which use CloudFront), the number of top level files/directories cannot exceed 25, the max number of behaviors a CloudFront Distribution supports. We recommend you put all of your public assets into one top level directory (i.e. public/static) so you don't reach this limit. See [CloudFront Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) for more information.\n- If using `NextjsGlobalFunctions`, when [revalidating data in Next.js](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#on-demand-revalidation) (i.e. [revalidatePath](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)), the CloudFront Cache will still hold stale data. You'll need to use AWS SDK JS V3 [CreateInvalidationCommand](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudfront/Class/CreateInvalidationCommand/) to manually invalidate the path in CloudFront. See more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html).\n- If using `NextjsGlobalFunctions`, setting an Authorization header won't work by default because of Lambda Function URL with IAM Auth is already using the Authorization header. You can use the `AWS_LWA_AUTHORIZATION_SOURCE` environment variable of [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to set an alternative Authorization header in the client which will then be set to the Authorization header when it reaches your app.\n- `NextjsRegionalFunctions` doesn't support streaming because API Gateway doesn't support streaming yet.\n- If using `NextjsRegionalFunctions` without a custom domain, API Gateway REST APIs require a [stage name](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html) (default: `/prod`) to be specified. This causes links to pages and static assets to break because they're not prefixed with the stage name. You can work around this issue by specifying [basePath](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath) in next.config.js as your stage name. Additionally, you'll need to add middleware logic to rewrite requests to include the stage name because API Gateway does not include the stage name in the path passed to Lambda. See [examples/app-playground/middleware.ts](./examples/app-playground/middleware.ts).\n\n## Additional Security Recommendations\n\nThis construct by default implements all AWS security best practices that a CDK construct library reasonably can considering cost and complexity. Below are additional security practices we recommend you implement within your CDK app. Please see them below:\n\n- [VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html). See [examples/](./examples) for sample implementation.\n- [Scan ECR Images For Vulnerabilities](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html).\n- For `NextjsGlobalFunctions` and `NextjsGlobalContainers`, [CloudFront Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html). See [examples/](./examples) for sample implementation.\n- For `NextjsGlobalContainers` and `NextjsRegionalContainers`, use [ALB HTTPS Listener](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)\n- If using `NextjsGlobalContainers` and `NextjsRegionalContainers`, enable `ReadonlyRootFilesystem`. This will remove ability to use Static On-Demand feature of Next.js so it's not enabled by default, but is recommended for security.\n\n## Estimated Costs\n\n### Assumptions\n\nThe following basic assumptions were used for a typical medium Next.js app. See [docs/usage.xlsx](./docs/usage.xlsx) for detailed assumptions and usage per construct type that you can plug into AWS Pricing Calculator.\n\n| Metric | Value |\n| ------------------------------------------------------------ | ----- |\n| Monthly Active Users | 1K |\n| Pages Visited Per Month Per User | 100 |\n| Avg Request Size | 50KB |\n| Static Requests Per Page (js, css, etc) | 15 |\n| Static Requests Cache Hit % | 50% |\n| Static Assets Size | 10GB |\n| Dynamic Requests Per Page (document, optimized images, etc.) | 5 |\n| Dynamic Cache Read % | 50% |\n| Dynamic Cache Write % | 5% |\n| Dynamic Cache Data Size | 10GB |\n| Average Dynamic Cache Request Size | 100KB |\n| Dynamic Revalidate Tag % | 1% |\n\nMore Details:\n\n- Assume ARM architecture for compute\n- AWS Region: us-east-1\n- Excludes charges related to: CloudWatch Logs, NAT Gateway data processing\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=23611f6fea87ef05d5fe87c33135ddde43b17a98)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ---------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $8.09 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=02f0073e612d1eee2a7ccace2c636adc5f0acab7)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------- | ---------------------------- |\n| ECS Fargate | 1 task (1 vCPU, 2 GB) | $28.44 |\n| ALB | 1 LB, 1.04GB/hr, 5.79 conn/sec | $22.50 |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $121.25 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=e214abe60eb4e24fc5866d07ef4355393261af3c)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ------------------------------------------ | ---------------------------- |\n| ECS Fargate | 1 task (2 vCPU, 4 GB), always on | $28.44 |\n| ALB | 1 LB, 4.17 GB/hr, 23.15 conn/sec | $40.78 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $139.00 |\n\n### NextjsRegionalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=60da38c7993c1baeee2fee4bd19ba6441608bb15)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| API Gateway | 2M requests | $7.00 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $11.08 |\n\n## Performance\n\n[Artillery Playwright](https://www.artillery.io/docs/reference/engines/playwright#overview) app playground example load tests results with 1K concurrent users. Reproduce with `pnpm test-fargate:lg` within `examples/load-tests`.\n\n### NextjsGlobalFunctions\n\n<details>\n<summary>`NextjsGlobalFunctions` Performance Details</summary>\n\n```bash\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr:\n min: ......................................................................... 6.3\n max: ......................................................................... 5017.4\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 22.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/1:\n min: ......................................................................... 3.2\n max: ......................................................................... 560.6\n mean: ........................................................................ 9.4\n median: ...................................................................... 5.4\n p95: ......................................................................... 11.1\n p99: ......................................................................... 162.4\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/2:\n min: ......................................................................... 3.1\n max: ......................................................................... 1511.9\n mean: ........................................................................ 9.2\n median: ...................................................................... 5.2\n p95: ......................................................................... 10.7\n p99: ......................................................................... 149.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/3:\n min: ......................................................................... 3.4\n max: ......................................................................... 131.1\n mean: ........................................................................ 7.1\n median: ...................................................................... 5.3\n p95: ......................................................................... 10.1\n p99: ......................................................................... 64.7\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.1\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg/3:\n min: ......................................................................... 2.9\n max: ......................................................................... 98\n mean: ........................................................................ 5.1\n median: ...................................................................... 4.6\n p95: ......................................................................... 8.2\n p99: ......................................................................... 12.8\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr:\n min: ......................................................................... 6.4\n max: ......................................................................... 5018.6\n mean: ........................................................................ 11.3\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr/2:\n min: ......................................................................... 83.4\n max: ......................................................................... 150.7\n mean: ........................................................................ 119\n median: ...................................................................... 111.1\n p95: ......................................................................... 147\n p99: ......................................................................... 147\nbrowser.page.TTFB.https://abc123.cloudfront.net/streaming:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.2\n mean: ........................................................................ 11.8\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\n```\n\n</details>\n\n\n\n### NextjsGlobalContainers\n\n<details>\n<summary>`NextjsGlobalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n### NextjsRegionalContainers\n\n<details>\n<summary>`NextjsRegionalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n### NextjsRegionalFunctions\n\n<details>\n<summary>`NextjsRegionalFunctions` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n## Guides\n\n- [Caching Guide](./docs/caching-guide.md)\n- [Pruning Guide](./docs/pruning-guide.md)\n- [Next Build Output Guide](./docs/next-build-output-guide.ts)\n- [Development Guide](./docs/development-guide.ts)\n\n## Contributing\n\nSteps to build locally:\n\n1. `git clone https://github.com/cdklabs/cdk-nextjs.git`\n2. `cd cdk-nextjs`\n3. `pnpm i && pnpm compile && pnpm build`\n\nThis project uses Projen, so make sure to not edit [Projen](https://projen.io/) created files and only edit .projenrc.ts.\n\n## FAQ\n\nQ: How does this compare to [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs)?<br/>\nA: cdk-nextjs-standalone relies on [OpenNext](https://github.com/sst/open-next). OpenNext injects custom code to interact with private Next.js APIs. While OpenNext is able to make some optimizations that are great for serverless environments, this comes at an increase maintenance cost and increased chances for breaking changes. A goal of cdk-nextjs is to customize Next.js as little as possible to reduce the maintenance burden and decrease chances of breaking changes.\n\nQ: Why does cdk-nextjs depend upon Next.js v16.2 or higher?\nA: This version is required for [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath#image-optimization-caching) so that cdk-nextjs can depend upon public Next.js API.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: See [Caching Guide](./docs/caching-guide.md)\n\nQ: How customizable is the `cdk-nextjs` package for different use cases?<br/>\nA: The `cdk-nextjs` package offers deep customization through _prop-based_ overrides. These can be accessed in the construct props, allowing you to override settings like VPC configurations, CloudFront distribution, and ECS/Fargate setup. For example, you can modify `nextjsBuildProps` to customize the build process or use `nextjsDistributionProps` to adjust how CloudFront handles caching and routing. This level of control makes it easy to adapt the infrastructure to your application’s specific performance, networking, or deployment needs.\n\nQ: How can I use a custom domain with `cdk-nextjs`?<br/>\nA: See [low-cost example](./examples/low-cost/app.ts).\n\nQ: What is difference between `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` and `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps`<br/>\nA: `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` allows you to customize any construct's props _within_ `NextjsDistribution` and is likely what you want whereas `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps` allows you to customize the props passed into the construct: `NextjsDistribution`. This principle also applies to other similarly named overrides.\n\nQ: Why use container image for `NextjsGlobalFunctions`?<br />\nA: Read [The case for containers on Lambda (with benchmarks)](https://aaronstuyvenberg.com/posts/containers-on-lambda). Also, we depend upon [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to transform lambda event payloads into HTTP requests that Next.js expects.\n\nQ: How can I `cdk bootstrap --cloudformation-execution-policies ...` my AWS Account with limited permissions for cdk-nextjs to deploy?<br />\nA: See [docs/cdk-nextjs-cfn-exec-policy.json](./docs/cdk-nextjs-cfn-exec-policy.json). Note, this IAM Policy is scoped to all cdk-nextjs constructs so you can remove services if you know the construct you're using doesn't use that service.\n\n## Acknowledgements\n\nThis construct was built on the shoulders of giants. Thank you to the contributors of [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs) and [open-next](https://github.com/sst/open-next).\n\n## 🥂 Thanks Contributors\n\nThank you for helping other developers deploy Next.js apps on AWS\n\n<a href=\"https://github.com/cdklabs/cdk-nextjs/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=cdklabs/cdk-nextjs\" />\n</a>\n"
|
|
8671
8671
|
},
|
|
8672
8672
|
"repository": {
|
|
8673
8673
|
"type": "git",
|
|
@@ -8962,7 +8962,7 @@
|
|
|
8962
8962
|
},
|
|
8963
8963
|
"locationInModule": {
|
|
8964
8964
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
8965
|
-
"line":
|
|
8965
|
+
"line": 123
|
|
8966
8966
|
},
|
|
8967
8967
|
"parameters": [
|
|
8968
8968
|
{
|
|
@@ -8994,7 +8994,7 @@
|
|
|
8994
8994
|
"kind": "class",
|
|
8995
8995
|
"locationInModule": {
|
|
8996
8996
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
8997
|
-
"line":
|
|
8997
|
+
"line": 111
|
|
8998
8998
|
},
|
|
8999
8999
|
"methods": [
|
|
9000
9000
|
{
|
|
@@ -9004,7 +9004,7 @@
|
|
|
9004
9004
|
},
|
|
9005
9005
|
"locationInModule": {
|
|
9006
9006
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9007
|
-
"line":
|
|
9007
|
+
"line": 162
|
|
9008
9008
|
},
|
|
9009
9009
|
"name": "computeBaseProps",
|
|
9010
9010
|
"protected": true,
|
|
@@ -9024,7 +9024,7 @@
|
|
|
9024
9024
|
"immutable": true,
|
|
9025
9025
|
"locationInModule": {
|
|
9026
9026
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9027
|
-
"line":
|
|
9027
|
+
"line": 120
|
|
9028
9028
|
},
|
|
9029
9029
|
"name": "baseProps",
|
|
9030
9030
|
"protected": true,
|
|
@@ -9039,7 +9039,7 @@
|
|
|
9039
9039
|
"immutable": true,
|
|
9040
9040
|
"locationInModule": {
|
|
9041
9041
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9042
|
-
"line":
|
|
9042
|
+
"line": 118
|
|
9043
9043
|
},
|
|
9044
9044
|
"name": "nextjsType",
|
|
9045
9045
|
"protected": true,
|
|
@@ -9055,7 +9055,7 @@
|
|
|
9055
9055
|
"immutable": true,
|
|
9056
9056
|
"locationInModule": {
|
|
9057
9057
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9058
|
-
"line":
|
|
9058
|
+
"line": 116
|
|
9059
9059
|
},
|
|
9060
9060
|
"name": "url",
|
|
9061
9061
|
"type": {
|
|
@@ -9069,7 +9069,7 @@
|
|
|
9069
9069
|
"immutable": true,
|
|
9070
9070
|
"locationInModule": {
|
|
9071
9071
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9072
|
-
"line":
|
|
9072
|
+
"line": 121
|
|
9073
9073
|
},
|
|
9074
9074
|
"name": "constructOverrides",
|
|
9075
9075
|
"optional": true,
|
|
@@ -9084,7 +9084,7 @@
|
|
|
9084
9084
|
},
|
|
9085
9085
|
"locationInModule": {
|
|
9086
9086
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9087
|
-
"line":
|
|
9087
|
+
"line": 112
|
|
9088
9088
|
},
|
|
9089
9089
|
"name": "nextjsBuild",
|
|
9090
9090
|
"type": {
|
|
@@ -9097,7 +9097,7 @@
|
|
|
9097
9097
|
},
|
|
9098
9098
|
"locationInModule": {
|
|
9099
9099
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9100
|
-
"line":
|
|
9100
|
+
"line": 114
|
|
9101
9101
|
},
|
|
9102
9102
|
"name": "nextjsCache",
|
|
9103
9103
|
"type": {
|
|
@@ -9110,7 +9110,7 @@
|
|
|
9110
9110
|
},
|
|
9111
9111
|
"locationInModule": {
|
|
9112
9112
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9113
|
-
"line":
|
|
9113
|
+
"line": 113
|
|
9114
9114
|
},
|
|
9115
9115
|
"name": "nextjsStaticAssets",
|
|
9116
9116
|
"type": {
|
|
@@ -9131,7 +9131,7 @@
|
|
|
9131
9131
|
"kind": "interface",
|
|
9132
9132
|
"locationInModule": {
|
|
9133
9133
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9134
|
-
"line":
|
|
9134
|
+
"line": 20
|
|
9135
9135
|
},
|
|
9136
9136
|
"name": "NextjsBaseConstructOverrides",
|
|
9137
9137
|
"properties": [
|
|
@@ -9143,7 +9143,7 @@
|
|
|
9143
9143
|
"immutable": true,
|
|
9144
9144
|
"locationInModule": {
|
|
9145
9145
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9146
|
-
"line":
|
|
9146
|
+
"line": 21
|
|
9147
9147
|
},
|
|
9148
9148
|
"name": "nextjsBuildProps",
|
|
9149
9149
|
"optional": true,
|
|
@@ -9159,7 +9159,7 @@
|
|
|
9159
9159
|
"immutable": true,
|
|
9160
9160
|
"locationInModule": {
|
|
9161
9161
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9162
|
-
"line":
|
|
9162
|
+
"line": 22
|
|
9163
9163
|
},
|
|
9164
9164
|
"name": "nextjsCacheProps",
|
|
9165
9165
|
"optional": true,
|
|
@@ -9175,7 +9175,7 @@
|
|
|
9175
9175
|
"immutable": true,
|
|
9176
9176
|
"locationInModule": {
|
|
9177
9177
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9178
|
-
"line":
|
|
9178
|
+
"line": 23
|
|
9179
9179
|
},
|
|
9180
9180
|
"name": "nextjsStaticAssetsProps",
|
|
9181
9181
|
"optional": true,
|
|
@@ -9200,7 +9200,7 @@
|
|
|
9200
9200
|
"kind": "interface",
|
|
9201
9201
|
"locationInModule": {
|
|
9202
9202
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9203
|
-
"line":
|
|
9203
|
+
"line": 104
|
|
9204
9204
|
},
|
|
9205
9205
|
"name": "NextjsBaseConstructProps",
|
|
9206
9206
|
"properties": [
|
|
@@ -9212,7 +9212,7 @@
|
|
|
9212
9212
|
"immutable": true,
|
|
9213
9213
|
"locationInModule": {
|
|
9214
9214
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9215
|
-
"line":
|
|
9215
|
+
"line": 105
|
|
9216
9216
|
},
|
|
9217
9217
|
"name": "overrides",
|
|
9218
9218
|
"optional": true,
|
|
@@ -9234,7 +9234,7 @@
|
|
|
9234
9234
|
"kind": "interface",
|
|
9235
9235
|
"locationInModule": {
|
|
9236
9236
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9237
|
-
"line":
|
|
9237
|
+
"line": 29
|
|
9238
9238
|
},
|
|
9239
9239
|
"name": "NextjsBaseOverrides",
|
|
9240
9240
|
"properties": [
|
|
@@ -9246,7 +9246,7 @@
|
|
|
9246
9246
|
"immutable": true,
|
|
9247
9247
|
"locationInModule": {
|
|
9248
9248
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9249
|
-
"line":
|
|
9249
|
+
"line": 30
|
|
9250
9250
|
},
|
|
9251
9251
|
"name": "nextjsCache",
|
|
9252
9252
|
"optional": true,
|
|
@@ -9262,7 +9262,7 @@
|
|
|
9262
9262
|
"immutable": true,
|
|
9263
9263
|
"locationInModule": {
|
|
9264
9264
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9265
|
-
"line":
|
|
9265
|
+
"line": 31
|
|
9266
9266
|
},
|
|
9267
9267
|
"name": "nextjsStaticAssets",
|
|
9268
9268
|
"optional": true,
|
|
@@ -9283,7 +9283,7 @@
|
|
|
9283
9283
|
"kind": "interface",
|
|
9284
9284
|
"locationInModule": {
|
|
9285
9285
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9286
|
-
"line":
|
|
9286
|
+
"line": 34
|
|
9287
9287
|
},
|
|
9288
9288
|
"name": "NextjsBaseProps",
|
|
9289
9289
|
"properties": [
|
|
@@ -9297,7 +9297,7 @@
|
|
|
9297
9297
|
"immutable": true,
|
|
9298
9298
|
"locationInModule": {
|
|
9299
9299
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9300
|
-
"line":
|
|
9300
|
+
"line": 51
|
|
9301
9301
|
},
|
|
9302
9302
|
"name": "buildDirectory",
|
|
9303
9303
|
"type": {
|
|
@@ -9314,7 +9314,7 @@
|
|
|
9314
9314
|
"immutable": true,
|
|
9315
9315
|
"locationInModule": {
|
|
9316
9316
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9317
|
-
"line":
|
|
9317
|
+
"line": 69
|
|
9318
9318
|
},
|
|
9319
9319
|
"name": "healthCheckPath",
|
|
9320
9320
|
"type": {
|
|
@@ -9331,7 +9331,7 @@
|
|
|
9331
9331
|
"immutable": true,
|
|
9332
9332
|
"locationInModule": {
|
|
9333
9333
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9334
|
-
"line":
|
|
9334
|
+
"line": 39
|
|
9335
9335
|
},
|
|
9336
9336
|
"name": "basePath",
|
|
9337
9337
|
"optional": true,
|
|
@@ -9349,7 +9349,7 @@
|
|
|
9349
9349
|
"immutable": true,
|
|
9350
9350
|
"locationInModule": {
|
|
9351
9351
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9352
|
-
"line":
|
|
9352
|
+
"line": 44
|
|
9353
9353
|
},
|
|
9354
9354
|
"name": "buildCommand",
|
|
9355
9355
|
"optional": true,
|
|
@@ -9357,6 +9357,42 @@
|
|
|
9357
9357
|
"primitive": "string"
|
|
9358
9358
|
}
|
|
9359
9359
|
},
|
|
9360
|
+
{
|
|
9361
|
+
"abstract": true,
|
|
9362
|
+
"docs": {
|
|
9363
|
+
"remarks": "When provided, cdk-nextjs\nwill use this bucket instead of creating a new one. Cache objects are\nprefixed with `buildId` so multiple deployments can safely share one bucket.",
|
|
9364
|
+
"stability": "stable",
|
|
9365
|
+
"summary": "Bring your own S3 bucket for cache storage."
|
|
9366
|
+
},
|
|
9367
|
+
"immutable": true,
|
|
9368
|
+
"locationInModule": {
|
|
9369
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9370
|
+
"line": 57
|
|
9371
|
+
},
|
|
9372
|
+
"name": "cacheBucket",
|
|
9373
|
+
"optional": true,
|
|
9374
|
+
"type": {
|
|
9375
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
9376
|
+
}
|
|
9377
|
+
},
|
|
9378
|
+
{
|
|
9379
|
+
"abstract": true,
|
|
9380
|
+
"docs": {
|
|
9381
|
+
"remarks": "When provided,\ncdk-nextjs will use this table instead of creating a new one. The table\nmust have `pk` (String) as partition key and `sk` (String) as sort key.\nEntries are partitioned by `buildId` so multiple deployments can safely\nshare one table.",
|
|
9382
|
+
"stability": "stable",
|
|
9383
|
+
"summary": "Bring your own DynamoDB table for revalidation metadata."
|
|
9384
|
+
},
|
|
9385
|
+
"immutable": true,
|
|
9386
|
+
"locationInModule": {
|
|
9387
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9388
|
+
"line": 77
|
|
9389
|
+
},
|
|
9390
|
+
"name": "revalidationTable",
|
|
9391
|
+
"optional": true,
|
|
9392
|
+
"type": {
|
|
9393
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
9394
|
+
}
|
|
9395
|
+
},
|
|
9360
9396
|
{
|
|
9361
9397
|
"abstract": true,
|
|
9362
9398
|
"docs": {
|
|
@@ -9368,7 +9404,7 @@
|
|
|
9368
9404
|
"immutable": true,
|
|
9369
9405
|
"locationInModule": {
|
|
9370
9406
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9371
|
-
"line":
|
|
9407
|
+
"line": 83
|
|
9372
9408
|
},
|
|
9373
9409
|
"name": "skipBuild",
|
|
9374
9410
|
"optional": true,
|
|
@@ -9376,6 +9412,24 @@
|
|
|
9376
9412
|
"primitive": "boolean"
|
|
9377
9413
|
}
|
|
9378
9414
|
},
|
|
9415
|
+
{
|
|
9416
|
+
"abstract": true,
|
|
9417
|
+
"docs": {
|
|
9418
|
+
"remarks": "When provided, cdk-nextjs\nwill deploy static assets to this bucket instead of creating a new one.\nUse with `basePath` to isolate assets per branch when sharing a bucket.",
|
|
9419
|
+
"stability": "stable",
|
|
9420
|
+
"summary": "Bring your own S3 bucket for static assets."
|
|
9421
|
+
},
|
|
9422
|
+
"immutable": true,
|
|
9423
|
+
"locationInModule": {
|
|
9424
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9425
|
+
"line": 89
|
|
9426
|
+
},
|
|
9427
|
+
"name": "staticAssetsBucket",
|
|
9428
|
+
"optional": true,
|
|
9429
|
+
"type": {
|
|
9430
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
9431
|
+
}
|
|
9432
|
+
},
|
|
9379
9433
|
{
|
|
9380
9434
|
"abstract": true,
|
|
9381
9435
|
"docs": {
|
|
@@ -9386,7 +9440,7 @@
|
|
|
9386
9440
|
"immutable": true,
|
|
9387
9441
|
"locationInModule": {
|
|
9388
9442
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9389
|
-
"line":
|
|
9443
|
+
"line": 97
|
|
9390
9444
|
},
|
|
9391
9445
|
"name": "vpc",
|
|
9392
9446
|
"optional": true,
|
|
@@ -9637,7 +9691,7 @@
|
|
|
9637
9691
|
},
|
|
9638
9692
|
"locationInModule": {
|
|
9639
9693
|
"filename": "src/nextjs-cache.ts",
|
|
9640
|
-
"line":
|
|
9694
|
+
"line": 64
|
|
9641
9695
|
},
|
|
9642
9696
|
"parameters": [
|
|
9643
9697
|
{
|
|
@@ -9663,7 +9717,7 @@
|
|
|
9663
9717
|
"kind": "class",
|
|
9664
9718
|
"locationInModule": {
|
|
9665
9719
|
"filename": "src/nextjs-cache.ts",
|
|
9666
|
-
"line":
|
|
9720
|
+
"line": 57
|
|
9667
9721
|
},
|
|
9668
9722
|
"name": "NextjsCache",
|
|
9669
9723
|
"properties": [
|
|
@@ -9674,7 +9728,7 @@
|
|
|
9674
9728
|
"immutable": true,
|
|
9675
9729
|
"locationInModule": {
|
|
9676
9730
|
"filename": "src/nextjs-cache.ts",
|
|
9677
|
-
"line":
|
|
9731
|
+
"line": 60
|
|
9678
9732
|
},
|
|
9679
9733
|
"name": "buildId",
|
|
9680
9734
|
"type": {
|
|
@@ -9688,7 +9742,7 @@
|
|
|
9688
9742
|
"immutable": true,
|
|
9689
9743
|
"locationInModule": {
|
|
9690
9744
|
"filename": "src/nextjs-cache.ts",
|
|
9691
|
-
"line":
|
|
9745
|
+
"line": 58
|
|
9692
9746
|
},
|
|
9693
9747
|
"name": "cacheBucket",
|
|
9694
9748
|
"type": {
|
|
@@ -9702,11 +9756,11 @@
|
|
|
9702
9756
|
"immutable": true,
|
|
9703
9757
|
"locationInModule": {
|
|
9704
9758
|
"filename": "src/nextjs-cache.ts",
|
|
9705
|
-
"line":
|
|
9759
|
+
"line": 59
|
|
9706
9760
|
},
|
|
9707
9761
|
"name": "revalidationTable",
|
|
9708
9762
|
"type": {
|
|
9709
|
-
"fqn": "aws-cdk-lib.aws_dynamodb.
|
|
9763
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
9710
9764
|
}
|
|
9711
9765
|
},
|
|
9712
9766
|
{
|
|
@@ -9716,7 +9770,7 @@
|
|
|
9716
9770
|
"immutable": true,
|
|
9717
9771
|
"locationInModule": {
|
|
9718
9772
|
"filename": "src/nextjs-cache.ts",
|
|
9719
|
-
"line":
|
|
9773
|
+
"line": 61
|
|
9720
9774
|
},
|
|
9721
9775
|
"name": "bucketDeployment",
|
|
9722
9776
|
"optional": true,
|
|
@@ -9737,7 +9791,7 @@
|
|
|
9737
9791
|
"kind": "interface",
|
|
9738
9792
|
"locationInModule": {
|
|
9739
9793
|
"filename": "src/nextjs-cache.ts",
|
|
9740
|
-
"line":
|
|
9794
|
+
"line": 25
|
|
9741
9795
|
},
|
|
9742
9796
|
"name": "NextjsCacheOverrides",
|
|
9743
9797
|
"properties": [
|
|
@@ -9749,7 +9803,7 @@
|
|
|
9749
9803
|
"immutable": true,
|
|
9750
9804
|
"locationInModule": {
|
|
9751
9805
|
"filename": "src/nextjs-cache.ts",
|
|
9752
|
-
"line":
|
|
9806
|
+
"line": 28
|
|
9753
9807
|
},
|
|
9754
9808
|
"name": "bucketDeploymentProps",
|
|
9755
9809
|
"optional": true,
|
|
@@ -9765,7 +9819,7 @@
|
|
|
9765
9819
|
"immutable": true,
|
|
9766
9820
|
"locationInModule": {
|
|
9767
9821
|
"filename": "src/nextjs-cache.ts",
|
|
9768
|
-
"line":
|
|
9822
|
+
"line": 26
|
|
9769
9823
|
},
|
|
9770
9824
|
"name": "cacheBucketProps",
|
|
9771
9825
|
"optional": true,
|
|
@@ -9781,7 +9835,7 @@
|
|
|
9781
9835
|
"immutable": true,
|
|
9782
9836
|
"locationInModule": {
|
|
9783
9837
|
"filename": "src/nextjs-cache.ts",
|
|
9784
|
-
"line":
|
|
9838
|
+
"line": 27
|
|
9785
9839
|
},
|
|
9786
9840
|
"name": "revalidationTableProps",
|
|
9787
9841
|
"optional": true,
|
|
@@ -9802,7 +9856,7 @@
|
|
|
9802
9856
|
"kind": "interface",
|
|
9803
9857
|
"locationInModule": {
|
|
9804
9858
|
"filename": "src/nextjs-cache.ts",
|
|
9805
|
-
"line":
|
|
9859
|
+
"line": 31
|
|
9806
9860
|
},
|
|
9807
9861
|
"name": "NextjsCacheProps",
|
|
9808
9862
|
"properties": [
|
|
@@ -9814,7 +9868,7 @@
|
|
|
9814
9868
|
"immutable": true,
|
|
9815
9869
|
"locationInModule": {
|
|
9816
9870
|
"filename": "src/nextjs-cache.ts",
|
|
9817
|
-
"line":
|
|
9871
|
+
"line": 32
|
|
9818
9872
|
},
|
|
9819
9873
|
"name": "buildId",
|
|
9820
9874
|
"type": {
|
|
@@ -9831,13 +9885,31 @@
|
|
|
9831
9885
|
"immutable": true,
|
|
9832
9886
|
"locationInModule": {
|
|
9833
9887
|
"filename": "src/nextjs-cache.ts",
|
|
9834
|
-
"line":
|
|
9888
|
+
"line": 43
|
|
9835
9889
|
},
|
|
9836
9890
|
"name": "initCacheDir",
|
|
9837
9891
|
"type": {
|
|
9838
9892
|
"primitive": "string"
|
|
9839
9893
|
}
|
|
9840
9894
|
},
|
|
9895
|
+
{
|
|
9896
|
+
"abstract": true,
|
|
9897
|
+
"docs": {
|
|
9898
|
+
"remarks": "When provided, cdk-nextjs\nwill skip creating a new bucket. Cache objects are prefixed with `buildId`\nso multiple deployments can safely share one bucket.",
|
|
9899
|
+
"stability": "stable",
|
|
9900
|
+
"summary": "Bring your own S3 bucket for cache storage."
|
|
9901
|
+
},
|
|
9902
|
+
"immutable": true,
|
|
9903
|
+
"locationInModule": {
|
|
9904
|
+
"filename": "src/nextjs-cache.ts",
|
|
9905
|
+
"line": 38
|
|
9906
|
+
},
|
|
9907
|
+
"name": "cacheBucket",
|
|
9908
|
+
"optional": true,
|
|
9909
|
+
"type": {
|
|
9910
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
9911
|
+
}
|
|
9912
|
+
},
|
|
9841
9913
|
{
|
|
9842
9914
|
"abstract": true,
|
|
9843
9915
|
"docs": {
|
|
@@ -9846,13 +9918,31 @@
|
|
|
9846
9918
|
"immutable": true,
|
|
9847
9919
|
"locationInModule": {
|
|
9848
9920
|
"filename": "src/nextjs-cache.ts",
|
|
9849
|
-
"line":
|
|
9921
|
+
"line": 44
|
|
9850
9922
|
},
|
|
9851
9923
|
"name": "overrides",
|
|
9852
9924
|
"optional": true,
|
|
9853
9925
|
"type": {
|
|
9854
9926
|
"fqn": "cdk-nextjs.NextjsCacheOverrides"
|
|
9855
9927
|
}
|
|
9928
|
+
},
|
|
9929
|
+
{
|
|
9930
|
+
"abstract": true,
|
|
9931
|
+
"docs": {
|
|
9932
|
+
"remarks": "When provided,\ncdk-nextjs will skip creating a new table. The table must have `pk` (String)\nas partition key and `sk` (String) as sort key. Entries are partitioned by\n`buildId` so multiple deployments can safely share one table.",
|
|
9933
|
+
"stability": "stable",
|
|
9934
|
+
"summary": "Bring your own DynamoDB table for revalidation metadata."
|
|
9935
|
+
},
|
|
9936
|
+
"immutable": true,
|
|
9937
|
+
"locationInModule": {
|
|
9938
|
+
"filename": "src/nextjs-cache.ts",
|
|
9939
|
+
"line": 51
|
|
9940
|
+
},
|
|
9941
|
+
"name": "revalidationTable",
|
|
9942
|
+
"optional": true,
|
|
9943
|
+
"type": {
|
|
9944
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
9945
|
+
}
|
|
9856
9946
|
}
|
|
9857
9947
|
],
|
|
9858
9948
|
"symbolId": "src/nextjs-cache:NextjsCacheProps"
|
|
@@ -9962,7 +10052,7 @@
|
|
|
9962
10052
|
},
|
|
9963
10053
|
"name": "revalidationTable",
|
|
9964
10054
|
"type": {
|
|
9965
|
-
"fqn": "aws-cdk-lib.aws_dynamodb.
|
|
10055
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
9966
10056
|
}
|
|
9967
10057
|
},
|
|
9968
10058
|
{
|
|
@@ -9999,7 +10089,7 @@
|
|
|
9999
10089
|
},
|
|
10000
10090
|
"locationInModule": {
|
|
10001
10091
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10002
|
-
"line":
|
|
10092
|
+
"line": 69
|
|
10003
10093
|
},
|
|
10004
10094
|
"parameters": [
|
|
10005
10095
|
{
|
|
@@ -10025,8 +10115,22 @@
|
|
|
10025
10115
|
"kind": "class",
|
|
10026
10116
|
"locationInModule": {
|
|
10027
10117
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10028
|
-
"line":
|
|
10118
|
+
"line": 61
|
|
10029
10119
|
},
|
|
10120
|
+
"methods": [
|
|
10121
|
+
{
|
|
10122
|
+
"docs": {
|
|
10123
|
+
"remarks": "Call this when you bring your own ALB that already has a\nlistener on the same port (typically port 80) to avoid a\n\"listener already exists on this port\" deployment failure.\n\nThis method:\n1. Removes the L1 `CfnListener` resource (keeps the L2 node so the\n target group child is preserved).\n2. Removes the associated security-group ingress rule for port 80.\n3. Rebuilds the ECS service `DependsOn` without the deleted listener.\n4. Removes `CfnOutput` resources auto-created by the ecs-patterns construct.",
|
|
10124
|
+
"stability": "stable",
|
|
10125
|
+
"summary": "Remove the HTTP listener that `ApplicationLoadBalancedFargateService` always creates."
|
|
10126
|
+
},
|
|
10127
|
+
"locationInModule": {
|
|
10128
|
+
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10129
|
+
"line": 313
|
|
10130
|
+
},
|
|
10131
|
+
"name": "removeAutoCreatedListener"
|
|
10132
|
+
}
|
|
10133
|
+
],
|
|
10030
10134
|
"name": "NextjsContainers",
|
|
10031
10135
|
"properties": [
|
|
10032
10136
|
{
|
|
@@ -10035,7 +10139,7 @@
|
|
|
10035
10139
|
},
|
|
10036
10140
|
"locationInModule": {
|
|
10037
10141
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10038
|
-
"line":
|
|
10142
|
+
"line": 62
|
|
10039
10143
|
},
|
|
10040
10144
|
"name": "albFargateService",
|
|
10041
10145
|
"type": {
|
|
@@ -10048,7 +10152,7 @@
|
|
|
10048
10152
|
},
|
|
10049
10153
|
"locationInModule": {
|
|
10050
10154
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10051
|
-
"line":
|
|
10155
|
+
"line": 65
|
|
10052
10156
|
},
|
|
10053
10157
|
"name": "dockerImageAsset",
|
|
10054
10158
|
"type": {
|
|
@@ -10061,11 +10165,11 @@
|
|
|
10061
10165
|
},
|
|
10062
10166
|
"locationInModule": {
|
|
10063
10167
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10064
|
-
"line":
|
|
10168
|
+
"line": 63
|
|
10065
10169
|
},
|
|
10066
10170
|
"name": "ecsCluster",
|
|
10067
10171
|
"type": {
|
|
10068
|
-
"fqn": "aws-cdk-lib.aws_ecs.
|
|
10172
|
+
"fqn": "aws-cdk-lib.aws_ecs.ICluster"
|
|
10069
10173
|
}
|
|
10070
10174
|
},
|
|
10071
10175
|
{
|
|
@@ -10074,7 +10178,7 @@
|
|
|
10074
10178
|
},
|
|
10075
10179
|
"locationInModule": {
|
|
10076
10180
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10077
|
-
"line":
|
|
10181
|
+
"line": 64
|
|
10078
10182
|
},
|
|
10079
10183
|
"name": "url",
|
|
10080
10184
|
"type": {
|
|
@@ -10094,7 +10198,7 @@
|
|
|
10094
10198
|
"kind": "interface",
|
|
10095
10199
|
"locationInModule": {
|
|
10096
10200
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10097
|
-
"line":
|
|
10201
|
+
"line": 32
|
|
10098
10202
|
},
|
|
10099
10203
|
"name": "NextjsContainersOverrides",
|
|
10100
10204
|
"properties": [
|
|
@@ -10106,7 +10210,7 @@
|
|
|
10106
10210
|
"immutable": true,
|
|
10107
10211
|
"locationInModule": {
|
|
10108
10212
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10109
|
-
"line":
|
|
10213
|
+
"line": 34
|
|
10110
10214
|
},
|
|
10111
10215
|
"name": "albFargateServiceProps",
|
|
10112
10216
|
"optional": true,
|
|
@@ -10122,7 +10226,7 @@
|
|
|
10122
10226
|
"immutable": true,
|
|
10123
10227
|
"locationInModule": {
|
|
10124
10228
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10125
|
-
"line":
|
|
10229
|
+
"line": 36
|
|
10126
10230
|
},
|
|
10127
10231
|
"name": "dockerImageAssetProps",
|
|
10128
10232
|
"optional": true,
|
|
@@ -10138,7 +10242,7 @@
|
|
|
10138
10242
|
"immutable": true,
|
|
10139
10243
|
"locationInModule": {
|
|
10140
10244
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10141
|
-
"line":
|
|
10245
|
+
"line": 33
|
|
10142
10246
|
},
|
|
10143
10247
|
"name": "ecsClusterProps",
|
|
10144
10248
|
"optional": true,
|
|
@@ -10154,7 +10258,7 @@
|
|
|
10154
10258
|
"immutable": true,
|
|
10155
10259
|
"locationInModule": {
|
|
10156
10260
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10157
|
-
"line":
|
|
10261
|
+
"line": 35
|
|
10158
10262
|
},
|
|
10159
10263
|
"name": "taskImageOptions",
|
|
10160
10264
|
"optional": true,
|
|
@@ -10178,7 +10282,7 @@
|
|
|
10178
10282
|
"kind": "interface",
|
|
10179
10283
|
"locationInModule": {
|
|
10180
10284
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10181
|
-
"line":
|
|
10285
|
+
"line": 39
|
|
10182
10286
|
},
|
|
10183
10287
|
"name": "NextjsContainersProps",
|
|
10184
10288
|
"properties": [
|
|
@@ -10190,13 +10294,49 @@
|
|
|
10190
10294
|
"immutable": true,
|
|
10191
10295
|
"locationInModule": {
|
|
10192
10296
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10193
|
-
"line":
|
|
10297
|
+
"line": 54
|
|
10194
10298
|
},
|
|
10195
10299
|
"name": "relativeEntrypointPath",
|
|
10196
10300
|
"type": {
|
|
10197
10301
|
"primitive": "string"
|
|
10198
10302
|
}
|
|
10199
10303
|
},
|
|
10304
|
+
{
|
|
10305
|
+
"abstract": true,
|
|
10306
|
+
"docs": {
|
|
10307
|
+
"remarks": "When provided, it is passed\ndirectly to `ApplicationLoadBalancedFargateService`. If the ALB already\nhas a listener on port 80, call `removeAutoCreatedListener()` after\nconstruction to avoid deployment failures.",
|
|
10308
|
+
"stability": "stable",
|
|
10309
|
+
"summary": "Bring your own Application Load Balancer."
|
|
10310
|
+
},
|
|
10311
|
+
"immutable": true,
|
|
10312
|
+
"locationInModule": {
|
|
10313
|
+
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10314
|
+
"line": 46
|
|
10315
|
+
},
|
|
10316
|
+
"name": "alb",
|
|
10317
|
+
"optional": true,
|
|
10318
|
+
"type": {
|
|
10319
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
10320
|
+
}
|
|
10321
|
+
},
|
|
10322
|
+
{
|
|
10323
|
+
"abstract": true,
|
|
10324
|
+
"docs": {
|
|
10325
|
+
"remarks": "When provided, cdk-nextjs will skip creating\na new cluster and VPC gateway endpoints. The cluster is passed directly\nto `ApplicationLoadBalancedFargateService`.",
|
|
10326
|
+
"stability": "stable",
|
|
10327
|
+
"summary": "Bring your own ECS cluster."
|
|
10328
|
+
},
|
|
10329
|
+
"immutable": true,
|
|
10330
|
+
"locationInModule": {
|
|
10331
|
+
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10332
|
+
"line": 52
|
|
10333
|
+
},
|
|
10334
|
+
"name": "ecsCluster",
|
|
10335
|
+
"optional": true,
|
|
10336
|
+
"type": {
|
|
10337
|
+
"fqn": "aws-cdk-lib.aws_ecs.ICluster"
|
|
10338
|
+
}
|
|
10339
|
+
},
|
|
10200
10340
|
{
|
|
10201
10341
|
"abstract": true,
|
|
10202
10342
|
"docs": {
|
|
@@ -10205,7 +10345,7 @@
|
|
|
10205
10345
|
"immutable": true,
|
|
10206
10346
|
"locationInModule": {
|
|
10207
10347
|
"filename": "src/nextjs-compute/nextjs-containers.ts",
|
|
10208
|
-
"line":
|
|
10348
|
+
"line": 53
|
|
10209
10349
|
},
|
|
10210
10350
|
"name": "overrides",
|
|
10211
10351
|
"optional": true,
|
|
@@ -10631,7 +10771,7 @@
|
|
|
10631
10771
|
"name": "loadBalancer",
|
|
10632
10772
|
"optional": true,
|
|
10633
10773
|
"type": {
|
|
10634
|
-
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.
|
|
10774
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
10635
10775
|
}
|
|
10636
10776
|
},
|
|
10637
10777
|
{
|
|
@@ -10843,7 +10983,7 @@
|
|
|
10843
10983
|
},
|
|
10844
10984
|
"locationInModule": {
|
|
10845
10985
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10846
|
-
"line":
|
|
10986
|
+
"line": 86
|
|
10847
10987
|
},
|
|
10848
10988
|
"parameters": [
|
|
10849
10989
|
{
|
|
@@ -10869,7 +11009,7 @@
|
|
|
10869
11009
|
"kind": "class",
|
|
10870
11010
|
"locationInModule": {
|
|
10871
11011
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10872
|
-
"line":
|
|
11012
|
+
"line": 76
|
|
10873
11013
|
},
|
|
10874
11014
|
"name": "NextjsGlobalContainers",
|
|
10875
11015
|
"properties": [
|
|
@@ -10880,7 +11020,7 @@
|
|
|
10880
11020
|
"immutable": true,
|
|
10881
11021
|
"locationInModule": {
|
|
10882
11022
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10883
|
-
"line":
|
|
11023
|
+
"line": 80
|
|
10884
11024
|
},
|
|
10885
11025
|
"name": "url",
|
|
10886
11026
|
"overrides": "cdk-nextjs.NextjsBaseConstruct",
|
|
@@ -10894,7 +11034,7 @@
|
|
|
10894
11034
|
},
|
|
10895
11035
|
"locationInModule": {
|
|
10896
11036
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10897
|
-
"line":
|
|
11037
|
+
"line": 77
|
|
10898
11038
|
},
|
|
10899
11039
|
"name": "nextjsContainers",
|
|
10900
11040
|
"type": {
|
|
@@ -10907,7 +11047,7 @@
|
|
|
10907
11047
|
},
|
|
10908
11048
|
"locationInModule": {
|
|
10909
11049
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10910
|
-
"line":
|
|
11050
|
+
"line": 78
|
|
10911
11051
|
},
|
|
10912
11052
|
"name": "nextjsDistribution",
|
|
10913
11053
|
"type": {
|
|
@@ -10920,7 +11060,7 @@
|
|
|
10920
11060
|
},
|
|
10921
11061
|
"locationInModule": {
|
|
10922
11062
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10923
|
-
"line":
|
|
11063
|
+
"line": 79
|
|
10924
11064
|
},
|
|
10925
11065
|
"name": "nextjsPostDeploy",
|
|
10926
11066
|
"type": {
|
|
@@ -10943,7 +11083,7 @@
|
|
|
10943
11083
|
"kind": "interface",
|
|
10944
11084
|
"locationInModule": {
|
|
10945
11085
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10946
|
-
"line":
|
|
11086
|
+
"line": 28
|
|
10947
11087
|
},
|
|
10948
11088
|
"name": "NextjsGlobalContainersConstructOverrides",
|
|
10949
11089
|
"properties": [
|
|
@@ -10955,7 +11095,7 @@
|
|
|
10955
11095
|
"immutable": true,
|
|
10956
11096
|
"locationInModule": {
|
|
10957
11097
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10958
|
-
"line":
|
|
11098
|
+
"line": 29
|
|
10959
11099
|
},
|
|
10960
11100
|
"name": "nextjsContainersProps",
|
|
10961
11101
|
"optional": true,
|
|
@@ -10971,7 +11111,7 @@
|
|
|
10971
11111
|
"immutable": true,
|
|
10972
11112
|
"locationInModule": {
|
|
10973
11113
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10974
|
-
"line":
|
|
11114
|
+
"line": 30
|
|
10975
11115
|
},
|
|
10976
11116
|
"name": "nextjsDistributionProps",
|
|
10977
11117
|
"optional": true,
|
|
@@ -10987,7 +11127,7 @@
|
|
|
10987
11127
|
"immutable": true,
|
|
10988
11128
|
"locationInModule": {
|
|
10989
11129
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
10990
|
-
"line":
|
|
11130
|
+
"line": 31
|
|
10991
11131
|
},
|
|
10992
11132
|
"name": "nextjsPostDeployProps",
|
|
10993
11133
|
"optional": true,
|
|
@@ -11013,7 +11153,7 @@
|
|
|
11013
11153
|
"kind": "interface",
|
|
11014
11154
|
"locationInModule": {
|
|
11015
11155
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11016
|
-
"line":
|
|
11156
|
+
"line": 39
|
|
11017
11157
|
},
|
|
11018
11158
|
"name": "NextjsGlobalContainersOverrides",
|
|
11019
11159
|
"properties": [
|
|
@@ -11025,7 +11165,7 @@
|
|
|
11025
11165
|
"immutable": true,
|
|
11026
11166
|
"locationInModule": {
|
|
11027
11167
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11028
|
-
"line":
|
|
11168
|
+
"line": 41
|
|
11029
11169
|
},
|
|
11030
11170
|
"name": "nextjsContainers",
|
|
11031
11171
|
"optional": true,
|
|
@@ -11041,7 +11181,7 @@
|
|
|
11041
11181
|
"immutable": true,
|
|
11042
11182
|
"locationInModule": {
|
|
11043
11183
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11044
|
-
"line":
|
|
11184
|
+
"line": 42
|
|
11045
11185
|
},
|
|
11046
11186
|
"name": "nextjsDistribution",
|
|
11047
11187
|
"optional": true,
|
|
@@ -11057,7 +11197,7 @@
|
|
|
11057
11197
|
"immutable": true,
|
|
11058
11198
|
"locationInModule": {
|
|
11059
11199
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11060
|
-
"line":
|
|
11200
|
+
"line": 40
|
|
11061
11201
|
},
|
|
11062
11202
|
"name": "nextjsGlobalContainers",
|
|
11063
11203
|
"optional": true,
|
|
@@ -11073,7 +11213,7 @@
|
|
|
11073
11213
|
"immutable": true,
|
|
11074
11214
|
"locationInModule": {
|
|
11075
11215
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11076
|
-
"line":
|
|
11216
|
+
"line": 43
|
|
11077
11217
|
},
|
|
11078
11218
|
"name": "nextjsPostDeploy",
|
|
11079
11219
|
"optional": true,
|
|
@@ -11097,10 +11237,28 @@
|
|
|
11097
11237
|
"kind": "interface",
|
|
11098
11238
|
"locationInModule": {
|
|
11099
11239
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11100
|
-
"line":
|
|
11240
|
+
"line": 46
|
|
11101
11241
|
},
|
|
11102
11242
|
"name": "NextjsGlobalContainersProps",
|
|
11103
11243
|
"properties": [
|
|
11244
|
+
{
|
|
11245
|
+
"abstract": true,
|
|
11246
|
+
"docs": {
|
|
11247
|
+
"remarks": "When provided, it is passed\ndirectly to `ApplicationLoadBalancedFargateService`. If the ALB already\nhas a listener on port 80, call `removeAutoCreatedListener()` after\nconstruction to avoid deployment failures.",
|
|
11248
|
+
"stability": "stable",
|
|
11249
|
+
"summary": "Bring your own Application Load Balancer."
|
|
11250
|
+
},
|
|
11251
|
+
"immutable": true,
|
|
11252
|
+
"locationInModule": {
|
|
11253
|
+
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11254
|
+
"line": 53
|
|
11255
|
+
},
|
|
11256
|
+
"name": "alb",
|
|
11257
|
+
"optional": true,
|
|
11258
|
+
"type": {
|
|
11259
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
11260
|
+
}
|
|
11261
|
+
},
|
|
11104
11262
|
{
|
|
11105
11263
|
"abstract": true,
|
|
11106
11264
|
"docs": {
|
|
@@ -11111,7 +11269,7 @@
|
|
|
11111
11269
|
"immutable": true,
|
|
11112
11270
|
"locationInModule": {
|
|
11113
11271
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11114
|
-
"line":
|
|
11272
|
+
"line": 58
|
|
11115
11273
|
},
|
|
11116
11274
|
"name": "distribution",
|
|
11117
11275
|
"optional": true,
|
|
@@ -11119,6 +11277,24 @@
|
|
|
11119
11277
|
"fqn": "aws-cdk-lib.aws_cloudfront.Distribution"
|
|
11120
11278
|
}
|
|
11121
11279
|
},
|
|
11280
|
+
{
|
|
11281
|
+
"abstract": true,
|
|
11282
|
+
"docs": {
|
|
11283
|
+
"remarks": "When provided, cdk-nextjs will skip creating\na new cluster and VPC gateway endpoints.",
|
|
11284
|
+
"stability": "stable",
|
|
11285
|
+
"summary": "Bring your own ECS cluster."
|
|
11286
|
+
},
|
|
11287
|
+
"immutable": true,
|
|
11288
|
+
"locationInModule": {
|
|
11289
|
+
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11290
|
+
"line": 63
|
|
11291
|
+
},
|
|
11292
|
+
"name": "ecsCluster",
|
|
11293
|
+
"optional": true,
|
|
11294
|
+
"type": {
|
|
11295
|
+
"fqn": "aws-cdk-lib.aws_ecs.ICluster"
|
|
11296
|
+
}
|
|
11297
|
+
},
|
|
11122
11298
|
{
|
|
11123
11299
|
"abstract": true,
|
|
11124
11300
|
"docs": {
|
|
@@ -11128,7 +11304,7 @@
|
|
|
11128
11304
|
"immutable": true,
|
|
11129
11305
|
"locationInModule": {
|
|
11130
11306
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11131
|
-
"line":
|
|
11307
|
+
"line": 67
|
|
11132
11308
|
},
|
|
11133
11309
|
"name": "overrides",
|
|
11134
11310
|
"optional": true,
|
|
@@ -11702,7 +11878,7 @@
|
|
|
11702
11878
|
"name": "revalidationTable",
|
|
11703
11879
|
"optional": true,
|
|
11704
11880
|
"type": {
|
|
11705
|
-
"fqn": "aws-cdk-lib.aws_dynamodb.
|
|
11881
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
11706
11882
|
}
|
|
11707
11883
|
},
|
|
11708
11884
|
{
|
|
@@ -11719,7 +11895,7 @@
|
|
|
11719
11895
|
"name": "staticAssetsBucket",
|
|
11720
11896
|
"optional": true,
|
|
11721
11897
|
"type": {
|
|
11722
|
-
"fqn": "aws-cdk-lib.aws_s3.
|
|
11898
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
11723
11899
|
}
|
|
11724
11900
|
}
|
|
11725
11901
|
],
|
|
@@ -11739,7 +11915,7 @@
|
|
|
11739
11915
|
},
|
|
11740
11916
|
"locationInModule": {
|
|
11741
11917
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11742
|
-
"line":
|
|
11918
|
+
"line": 72
|
|
11743
11919
|
},
|
|
11744
11920
|
"parameters": [
|
|
11745
11921
|
{
|
|
@@ -11765,7 +11941,7 @@
|
|
|
11765
11941
|
"kind": "class",
|
|
11766
11942
|
"locationInModule": {
|
|
11767
11943
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11768
|
-
"line":
|
|
11944
|
+
"line": 63
|
|
11769
11945
|
},
|
|
11770
11946
|
"name": "NextjsRegionalContainers",
|
|
11771
11947
|
"properties": [
|
|
@@ -11776,7 +11952,7 @@
|
|
|
11776
11952
|
"immutable": true,
|
|
11777
11953
|
"locationInModule": {
|
|
11778
11954
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11779
|
-
"line":
|
|
11955
|
+
"line": 66
|
|
11780
11956
|
},
|
|
11781
11957
|
"name": "url",
|
|
11782
11958
|
"overrides": "cdk-nextjs.NextjsBaseConstruct",
|
|
@@ -11790,7 +11966,7 @@
|
|
|
11790
11966
|
},
|
|
11791
11967
|
"locationInModule": {
|
|
11792
11968
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11793
|
-
"line":
|
|
11969
|
+
"line": 64
|
|
11794
11970
|
},
|
|
11795
11971
|
"name": "nextjsContainers",
|
|
11796
11972
|
"type": {
|
|
@@ -11803,7 +11979,7 @@
|
|
|
11803
11979
|
},
|
|
11804
11980
|
"locationInModule": {
|
|
11805
11981
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11806
|
-
"line":
|
|
11982
|
+
"line": 65
|
|
11807
11983
|
},
|
|
11808
11984
|
"name": "nextjsPostDeploy",
|
|
11809
11985
|
"type": {
|
|
@@ -11826,7 +12002,7 @@
|
|
|
11826
12002
|
"kind": "interface",
|
|
11827
12003
|
"locationInModule": {
|
|
11828
12004
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11829
|
-
"line":
|
|
12005
|
+
"line": 22
|
|
11830
12006
|
},
|
|
11831
12007
|
"name": "NextjsRegionalContainersConstructOverrides",
|
|
11832
12008
|
"properties": [
|
|
@@ -11838,7 +12014,7 @@
|
|
|
11838
12014
|
"immutable": true,
|
|
11839
12015
|
"locationInModule": {
|
|
11840
12016
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11841
|
-
"line":
|
|
12017
|
+
"line": 23
|
|
11842
12018
|
},
|
|
11843
12019
|
"name": "nextjsContainerProps",
|
|
11844
12020
|
"optional": true,
|
|
@@ -11854,7 +12030,7 @@
|
|
|
11854
12030
|
"immutable": true,
|
|
11855
12031
|
"locationInModule": {
|
|
11856
12032
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11857
|
-
"line":
|
|
12033
|
+
"line": 24
|
|
11858
12034
|
},
|
|
11859
12035
|
"name": "nextjsPostDeployProps",
|
|
11860
12036
|
"optional": true,
|
|
@@ -11880,7 +12056,7 @@
|
|
|
11880
12056
|
"kind": "interface",
|
|
11881
12057
|
"locationInModule": {
|
|
11882
12058
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11883
|
-
"line":
|
|
12059
|
+
"line": 32
|
|
11884
12060
|
},
|
|
11885
12061
|
"name": "NextjsRegionalContainersOverrides",
|
|
11886
12062
|
"properties": [
|
|
@@ -11892,7 +12068,7 @@
|
|
|
11892
12068
|
"immutable": true,
|
|
11893
12069
|
"locationInModule": {
|
|
11894
12070
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11895
|
-
"line":
|
|
12071
|
+
"line": 34
|
|
11896
12072
|
},
|
|
11897
12073
|
"name": "nextjsContainers",
|
|
11898
12074
|
"optional": true,
|
|
@@ -11908,7 +12084,7 @@
|
|
|
11908
12084
|
"immutable": true,
|
|
11909
12085
|
"locationInModule": {
|
|
11910
12086
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11911
|
-
"line":
|
|
12087
|
+
"line": 35
|
|
11912
12088
|
},
|
|
11913
12089
|
"name": "nextjsPostDeploy",
|
|
11914
12090
|
"optional": true,
|
|
@@ -11924,7 +12100,7 @@
|
|
|
11924
12100
|
"immutable": true,
|
|
11925
12101
|
"locationInModule": {
|
|
11926
12102
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11927
|
-
"line":
|
|
12103
|
+
"line": 33
|
|
11928
12104
|
},
|
|
11929
12105
|
"name": "nextjsRegionalContainers",
|
|
11930
12106
|
"optional": true,
|
|
@@ -11948,10 +12124,46 @@
|
|
|
11948
12124
|
"kind": "interface",
|
|
11949
12125
|
"locationInModule": {
|
|
11950
12126
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11951
|
-
"line":
|
|
12127
|
+
"line": 38
|
|
11952
12128
|
},
|
|
11953
12129
|
"name": "NextjsRegionalContainersProps",
|
|
11954
12130
|
"properties": [
|
|
12131
|
+
{
|
|
12132
|
+
"abstract": true,
|
|
12133
|
+
"docs": {
|
|
12134
|
+
"remarks": "When provided, it is passed\ndirectly to `ApplicationLoadBalancedFargateService`. If the ALB already\nhas a listener on port 80, call `removeAutoCreatedListener()` after\nconstruction to avoid deployment failures.",
|
|
12135
|
+
"stability": "stable",
|
|
12136
|
+
"summary": "Bring your own Application Load Balancer."
|
|
12137
|
+
},
|
|
12138
|
+
"immutable": true,
|
|
12139
|
+
"locationInModule": {
|
|
12140
|
+
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
12141
|
+
"line": 45
|
|
12142
|
+
},
|
|
12143
|
+
"name": "alb",
|
|
12144
|
+
"optional": true,
|
|
12145
|
+
"type": {
|
|
12146
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
12147
|
+
}
|
|
12148
|
+
},
|
|
12149
|
+
{
|
|
12150
|
+
"abstract": true,
|
|
12151
|
+
"docs": {
|
|
12152
|
+
"remarks": "When provided, cdk-nextjs will skip creating\na new cluster and VPC gateway endpoints.",
|
|
12153
|
+
"stability": "stable",
|
|
12154
|
+
"summary": "Bring your own ECS cluster."
|
|
12155
|
+
},
|
|
12156
|
+
"immutable": true,
|
|
12157
|
+
"locationInModule": {
|
|
12158
|
+
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
12159
|
+
"line": 50
|
|
12160
|
+
},
|
|
12161
|
+
"name": "ecsCluster",
|
|
12162
|
+
"optional": true,
|
|
12163
|
+
"type": {
|
|
12164
|
+
"fqn": "aws-cdk-lib.aws_ecs.ICluster"
|
|
12165
|
+
}
|
|
12166
|
+
},
|
|
11955
12167
|
{
|
|
11956
12168
|
"abstract": true,
|
|
11957
12169
|
"docs": {
|
|
@@ -11961,7 +12173,7 @@
|
|
|
11961
12173
|
"immutable": true,
|
|
11962
12174
|
"locationInModule": {
|
|
11963
12175
|
"filename": "src/root-constructs/nextjs-regional-containers.ts",
|
|
11964
|
-
"line":
|
|
12176
|
+
"line": 54
|
|
11965
12177
|
},
|
|
11966
12178
|
"name": "overrides",
|
|
11967
12179
|
"optional": true,
|
|
@@ -12278,7 +12490,7 @@
|
|
|
12278
12490
|
},
|
|
12279
12491
|
"locationInModule": {
|
|
12280
12492
|
"filename": "src/nextjs-static-assets.ts",
|
|
12281
|
-
"line":
|
|
12493
|
+
"line": 66
|
|
12282
12494
|
},
|
|
12283
12495
|
"parameters": [
|
|
12284
12496
|
{
|
|
@@ -12304,7 +12516,7 @@
|
|
|
12304
12516
|
"kind": "class",
|
|
12305
12517
|
"locationInModule": {
|
|
12306
12518
|
"filename": "src/nextjs-static-assets.ts",
|
|
12307
|
-
"line":
|
|
12519
|
+
"line": 59
|
|
12308
12520
|
},
|
|
12309
12521
|
"name": "NextjsStaticAssets",
|
|
12310
12522
|
"properties": [
|
|
@@ -12314,11 +12526,11 @@
|
|
|
12314
12526
|
},
|
|
12315
12527
|
"locationInModule": {
|
|
12316
12528
|
"filename": "src/nextjs-static-assets.ts",
|
|
12317
|
-
"line":
|
|
12529
|
+
"line": 60
|
|
12318
12530
|
},
|
|
12319
12531
|
"name": "bucket",
|
|
12320
12532
|
"type": {
|
|
12321
|
-
"fqn": "aws-cdk-lib.aws_s3.
|
|
12533
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
12322
12534
|
}
|
|
12323
12535
|
},
|
|
12324
12536
|
{
|
|
@@ -12327,7 +12539,7 @@
|
|
|
12327
12539
|
},
|
|
12328
12540
|
"locationInModule": {
|
|
12329
12541
|
"filename": "src/nextjs-static-assets.ts",
|
|
12330
|
-
"line":
|
|
12542
|
+
"line": 61
|
|
12331
12543
|
},
|
|
12332
12544
|
"name": "deployment",
|
|
12333
12545
|
"type": {
|
|
@@ -12347,7 +12559,7 @@
|
|
|
12347
12559
|
"kind": "interface",
|
|
12348
12560
|
"locationInModule": {
|
|
12349
12561
|
"filename": "src/nextjs-static-assets.ts",
|
|
12350
|
-
"line":
|
|
12562
|
+
"line": 27
|
|
12351
12563
|
},
|
|
12352
12564
|
"name": "NextjsStaticAssetsOverrides",
|
|
12353
12565
|
"properties": [
|
|
@@ -12359,7 +12571,7 @@
|
|
|
12359
12571
|
"immutable": true,
|
|
12360
12572
|
"locationInModule": {
|
|
12361
12573
|
"filename": "src/nextjs-static-assets.ts",
|
|
12362
|
-
"line":
|
|
12574
|
+
"line": 29
|
|
12363
12575
|
},
|
|
12364
12576
|
"name": "bucketDeploymentProps",
|
|
12365
12577
|
"optional": true,
|
|
@@ -12375,7 +12587,7 @@
|
|
|
12375
12587
|
"immutable": true,
|
|
12376
12588
|
"locationInModule": {
|
|
12377
12589
|
"filename": "src/nextjs-static-assets.ts",
|
|
12378
|
-
"line":
|
|
12590
|
+
"line": 28
|
|
12379
12591
|
},
|
|
12380
12592
|
"name": "bucketProps",
|
|
12381
12593
|
"optional": true,
|
|
@@ -12396,7 +12608,7 @@
|
|
|
12396
12608
|
"kind": "interface",
|
|
12397
12609
|
"locationInModule": {
|
|
12398
12610
|
"filename": "src/nextjs-static-assets.ts",
|
|
12399
|
-
"line":
|
|
12611
|
+
"line": 32
|
|
12400
12612
|
},
|
|
12401
12613
|
"name": "NextjsStaticAssetsProps",
|
|
12402
12614
|
"properties": [
|
|
@@ -12409,7 +12621,7 @@
|
|
|
12409
12621
|
"immutable": true,
|
|
12410
12622
|
"locationInModule": {
|
|
12411
12623
|
"filename": "src/nextjs-static-assets.ts",
|
|
12412
|
-
"line":
|
|
12624
|
+
"line": 43
|
|
12413
12625
|
},
|
|
12414
12626
|
"name": "buildDirectory",
|
|
12415
12627
|
"type": {
|
|
@@ -12425,7 +12637,7 @@
|
|
|
12425
12637
|
"immutable": true,
|
|
12426
12638
|
"locationInModule": {
|
|
12427
12639
|
"filename": "src/nextjs-static-assets.ts",
|
|
12428
|
-
"line":
|
|
12640
|
+
"line": 47
|
|
12429
12641
|
},
|
|
12430
12642
|
"name": "buildId",
|
|
12431
12643
|
"type": {
|
|
@@ -12442,7 +12654,7 @@
|
|
|
12442
12654
|
"immutable": true,
|
|
12443
12655
|
"locationInModule": {
|
|
12444
12656
|
"filename": "src/nextjs-static-assets.ts",
|
|
12445
|
-
"line":
|
|
12657
|
+
"line": 52
|
|
12446
12658
|
},
|
|
12447
12659
|
"name": "basePath",
|
|
12448
12660
|
"optional": true,
|
|
@@ -12450,6 +12662,24 @@
|
|
|
12450
12662
|
"primitive": "string"
|
|
12451
12663
|
}
|
|
12452
12664
|
},
|
|
12665
|
+
{
|
|
12666
|
+
"abstract": true,
|
|
12667
|
+
"docs": {
|
|
12668
|
+
"remarks": "When provided, cdk-nextjs\nwill skip creating a new bucket and deploy assets to this bucket instead.\nUse with `basePath` to isolate assets per branch when sharing a bucket.",
|
|
12669
|
+
"stability": "stable",
|
|
12670
|
+
"summary": "Bring your own S3 bucket for static assets."
|
|
12671
|
+
},
|
|
12672
|
+
"immutable": true,
|
|
12673
|
+
"locationInModule": {
|
|
12674
|
+
"filename": "src/nextjs-static-assets.ts",
|
|
12675
|
+
"line": 38
|
|
12676
|
+
},
|
|
12677
|
+
"name": "bucket",
|
|
12678
|
+
"optional": true,
|
|
12679
|
+
"type": {
|
|
12680
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
12681
|
+
}
|
|
12682
|
+
},
|
|
12453
12683
|
{
|
|
12454
12684
|
"abstract": true,
|
|
12455
12685
|
"docs": {
|
|
@@ -12458,7 +12688,7 @@
|
|
|
12458
12688
|
"immutable": true,
|
|
12459
12689
|
"locationInModule": {
|
|
12460
12690
|
"filename": "src/nextjs-static-assets.ts",
|
|
12461
|
-
"line":
|
|
12691
|
+
"line": 53
|
|
12462
12692
|
},
|
|
12463
12693
|
"name": "overrides",
|
|
12464
12694
|
"optional": true,
|
|
@@ -17387,7 +17617,7 @@
|
|
|
17387
17617
|
"kind": "interface",
|
|
17388
17618
|
"locationInModule": {
|
|
17389
17619
|
"filename": "src/generated-structs/OptionalNextjsCacheProps.ts",
|
|
17390
|
-
"line":
|
|
17620
|
+
"line": 7
|
|
17391
17621
|
},
|
|
17392
17622
|
"name": "OptionalNextjsCacheProps",
|
|
17393
17623
|
"properties": [
|
|
@@ -17399,7 +17629,7 @@
|
|
|
17399
17629
|
"immutable": true,
|
|
17400
17630
|
"locationInModule": {
|
|
17401
17631
|
"filename": "src/generated-structs/OptionalNextjsCacheProps.ts",
|
|
17402
|
-
"line":
|
|
17632
|
+
"line": 33
|
|
17403
17633
|
},
|
|
17404
17634
|
"name": "buildId",
|
|
17405
17635
|
"optional": true,
|
|
@@ -17407,6 +17637,24 @@
|
|
|
17407
17637
|
"primitive": "string"
|
|
17408
17638
|
}
|
|
17409
17639
|
},
|
|
17640
|
+
{
|
|
17641
|
+
"abstract": true,
|
|
17642
|
+
"docs": {
|
|
17643
|
+
"remarks": "When provided, cdk-nextjs\nwill skip creating a new bucket. Cache objects are prefixed with `buildId`\nso multiple deployments can safely share one bucket.",
|
|
17644
|
+
"stability": "stable",
|
|
17645
|
+
"summary": "Bring your own S3 bucket for cache storage."
|
|
17646
|
+
},
|
|
17647
|
+
"immutable": true,
|
|
17648
|
+
"locationInModule": {
|
|
17649
|
+
"filename": "src/generated-structs/OptionalNextjsCacheProps.ts",
|
|
17650
|
+
"line": 24
|
|
17651
|
+
},
|
|
17652
|
+
"name": "cacheBucket",
|
|
17653
|
+
"optional": true,
|
|
17654
|
+
"type": {
|
|
17655
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
17656
|
+
}
|
|
17657
|
+
},
|
|
17410
17658
|
{
|
|
17411
17659
|
"abstract": true,
|
|
17412
17660
|
"docs": {
|
|
@@ -17416,13 +17664,31 @@
|
|
|
17416
17664
|
"immutable": true,
|
|
17417
17665
|
"locationInModule": {
|
|
17418
17666
|
"filename": "src/generated-structs/OptionalNextjsCacheProps.ts",
|
|
17419
|
-
"line":
|
|
17667
|
+
"line": 29
|
|
17420
17668
|
},
|
|
17421
17669
|
"name": "initCacheDir",
|
|
17422
17670
|
"optional": true,
|
|
17423
17671
|
"type": {
|
|
17424
17672
|
"primitive": "string"
|
|
17425
17673
|
}
|
|
17674
|
+
},
|
|
17675
|
+
{
|
|
17676
|
+
"abstract": true,
|
|
17677
|
+
"docs": {
|
|
17678
|
+
"remarks": "When provided,\ncdk-nextjs will skip creating a new table. The table must have `pk` (String)\nas partition key and `sk` (String) as sort key. Entries are partitioned by\n`buildId` so multiple deployments can safely share one table.",
|
|
17679
|
+
"stability": "stable",
|
|
17680
|
+
"summary": "Bring your own DynamoDB table for revalidation metadata."
|
|
17681
|
+
},
|
|
17682
|
+
"immutable": true,
|
|
17683
|
+
"locationInModule": {
|
|
17684
|
+
"filename": "src/generated-structs/OptionalNextjsCacheProps.ts",
|
|
17685
|
+
"line": 16
|
|
17686
|
+
},
|
|
17687
|
+
"name": "revalidationTable",
|
|
17688
|
+
"optional": true,
|
|
17689
|
+
"type": {
|
|
17690
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
17691
|
+
}
|
|
17426
17692
|
}
|
|
17427
17693
|
],
|
|
17428
17694
|
"symbolId": "src/generated-structs/OptionalNextjsCacheProps:OptionalNextjsCacheProps"
|
|
@@ -17442,6 +17708,24 @@
|
|
|
17442
17708
|
},
|
|
17443
17709
|
"name": "OptionalNextjsContainersProps",
|
|
17444
17710
|
"properties": [
|
|
17711
|
+
{
|
|
17712
|
+
"abstract": true,
|
|
17713
|
+
"docs": {
|
|
17714
|
+
"remarks": "When provided, it is passed\ndirectly to `ApplicationLoadBalancedFargateService`. If the ALB already\nhas a listener on port 80, call `removeAutoCreatedListener()` after\nconstruction to avoid deployment failures.",
|
|
17715
|
+
"stability": "stable",
|
|
17716
|
+
"summary": "Bring your own Application Load Balancer."
|
|
17717
|
+
},
|
|
17718
|
+
"immutable": true,
|
|
17719
|
+
"locationInModule": {
|
|
17720
|
+
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17721
|
+
"line": 25
|
|
17722
|
+
},
|
|
17723
|
+
"name": "alb",
|
|
17724
|
+
"optional": true,
|
|
17725
|
+
"type": {
|
|
17726
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
17727
|
+
}
|
|
17728
|
+
},
|
|
17445
17729
|
{
|
|
17446
17730
|
"abstract": true,
|
|
17447
17731
|
"docs": {
|
|
@@ -17451,7 +17735,7 @@
|
|
|
17451
17735
|
"immutable": true,
|
|
17452
17736
|
"locationInModule": {
|
|
17453
17737
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17454
|
-
"line":
|
|
17738
|
+
"line": 62
|
|
17455
17739
|
},
|
|
17456
17740
|
"name": "buildDirectory",
|
|
17457
17741
|
"optional": true,
|
|
@@ -17468,7 +17752,7 @@
|
|
|
17468
17752
|
"immutable": true,
|
|
17469
17753
|
"locationInModule": {
|
|
17470
17754
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17471
|
-
"line":
|
|
17755
|
+
"line": 57
|
|
17472
17756
|
},
|
|
17473
17757
|
"name": "buildId",
|
|
17474
17758
|
"optional": true,
|
|
@@ -17485,7 +17769,7 @@
|
|
|
17485
17769
|
"immutable": true,
|
|
17486
17770
|
"locationInModule": {
|
|
17487
17771
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17488
|
-
"line":
|
|
17772
|
+
"line": 52
|
|
17489
17773
|
},
|
|
17490
17774
|
"name": "cacheBucket",
|
|
17491
17775
|
"optional": true,
|
|
@@ -17493,6 +17777,24 @@
|
|
|
17493
17777
|
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
17494
17778
|
}
|
|
17495
17779
|
},
|
|
17780
|
+
{
|
|
17781
|
+
"abstract": true,
|
|
17782
|
+
"docs": {
|
|
17783
|
+
"remarks": "When provided, cdk-nextjs will skip creating\na new cluster and VPC gateway endpoints. The cluster is passed directly\nto `ApplicationLoadBalancedFargateService`.",
|
|
17784
|
+
"stability": "stable",
|
|
17785
|
+
"summary": "Bring your own ECS cluster."
|
|
17786
|
+
},
|
|
17787
|
+
"immutable": true,
|
|
17788
|
+
"locationInModule": {
|
|
17789
|
+
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17790
|
+
"line": 16
|
|
17791
|
+
},
|
|
17792
|
+
"name": "ecsCluster",
|
|
17793
|
+
"optional": true,
|
|
17794
|
+
"type": {
|
|
17795
|
+
"fqn": "aws-cdk-lib.aws_ecs.ICluster"
|
|
17796
|
+
}
|
|
17797
|
+
},
|
|
17496
17798
|
{
|
|
17497
17799
|
"abstract": true,
|
|
17498
17800
|
"docs": {
|
|
@@ -17501,7 +17803,7 @@
|
|
|
17501
17803
|
"immutable": true,
|
|
17502
17804
|
"locationInModule": {
|
|
17503
17805
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17504
|
-
"line":
|
|
17806
|
+
"line": 47
|
|
17505
17807
|
},
|
|
17506
17808
|
"name": "healthCheckPath",
|
|
17507
17809
|
"optional": true,
|
|
@@ -17517,7 +17819,7 @@
|
|
|
17517
17819
|
"immutable": true,
|
|
17518
17820
|
"locationInModule": {
|
|
17519
17821
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17520
|
-
"line":
|
|
17822
|
+
"line": 43
|
|
17521
17823
|
},
|
|
17522
17824
|
"name": "nextjsType",
|
|
17523
17825
|
"optional": true,
|
|
@@ -17533,7 +17835,7 @@
|
|
|
17533
17835
|
"immutable": true,
|
|
17534
17836
|
"locationInModule": {
|
|
17535
17837
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17536
|
-
"line":
|
|
17838
|
+
"line": 29
|
|
17537
17839
|
},
|
|
17538
17840
|
"name": "relativeEntrypointPath",
|
|
17539
17841
|
"optional": true,
|
|
@@ -17550,7 +17852,7 @@
|
|
|
17550
17852
|
"immutable": true,
|
|
17551
17853
|
"locationInModule": {
|
|
17552
17854
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17553
|
-
"line":
|
|
17855
|
+
"line": 34
|
|
17554
17856
|
},
|
|
17555
17857
|
"name": "relativePathToPackage",
|
|
17556
17858
|
"optional": true,
|
|
@@ -17567,12 +17869,12 @@
|
|
|
17567
17869
|
"immutable": true,
|
|
17568
17870
|
"locationInModule": {
|
|
17569
17871
|
"filename": "src/generated-structs/OptionalNextjsContainersProps.ts",
|
|
17570
|
-
"line":
|
|
17872
|
+
"line": 39
|
|
17571
17873
|
},
|
|
17572
17874
|
"name": "revalidationTable",
|
|
17573
17875
|
"optional": true,
|
|
17574
17876
|
"type": {
|
|
17575
|
-
"fqn": "aws-cdk-lib.aws_dynamodb.
|
|
17877
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
17576
17878
|
}
|
|
17577
17879
|
}
|
|
17578
17880
|
],
|
|
@@ -17691,7 +17993,7 @@
|
|
|
17691
17993
|
"name": "loadBalancer",
|
|
17692
17994
|
"optional": true,
|
|
17693
17995
|
"type": {
|
|
17694
|
-
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.
|
|
17996
|
+
"fqn": "aws-cdk-lib.aws_elasticloadbalancingv2.IApplicationLoadBalancer"
|
|
17695
17997
|
}
|
|
17696
17998
|
},
|
|
17697
17999
|
{
|
|
@@ -17832,7 +18134,7 @@
|
|
|
17832
18134
|
"name": "revalidationTable",
|
|
17833
18135
|
"optional": true,
|
|
17834
18136
|
"type": {
|
|
17835
|
-
"fqn": "aws-cdk-lib.aws_dynamodb.
|
|
18137
|
+
"fqn": "aws-cdk-lib.aws_dynamodb.ITableV2"
|
|
17836
18138
|
}
|
|
17837
18139
|
},
|
|
17838
18140
|
{
|
|
@@ -17849,7 +18151,7 @@
|
|
|
17849
18151
|
"name": "staticAssetsBucket",
|
|
17850
18152
|
"optional": true,
|
|
17851
18153
|
"type": {
|
|
17852
|
-
"fqn": "aws-cdk-lib.aws_s3.
|
|
18154
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
17853
18155
|
}
|
|
17854
18156
|
}
|
|
17855
18157
|
],
|
|
@@ -18863,6 +19165,6 @@
|
|
|
18863
19165
|
"symbolId": "src/nextjs-build/nextjs-build:PublicDirEntry"
|
|
18864
19166
|
}
|
|
18865
19167
|
},
|
|
18866
|
-
"version": "0.5.0-beta.
|
|
18867
|
-
"fingerprint": "
|
|
19168
|
+
"version": "0.5.0-beta.5",
|
|
19169
|
+
"fingerprint": "iRu/gdhN1F1iMLspOQFkButbxB51B2fC95LizHPwp/g="
|
|
18868
19170
|
}
|