cdk-nextjs 0.4.2 → 0.4.3

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.
Files changed (42) hide show
  1. package/.jsii +1253 -732
  2. package/API.md +2458 -1108
  3. package/README.md +37 -5
  4. package/docs/cdk-nextjs-NextjsRegionalFunctions.png +0 -0
  5. package/docs/cdk-nextjs-cfn-exec-policy.json +27 -0
  6. package/docs/cdk-nextjs.drawio +71 -11
  7. package/lib/constants.d.ts +2 -1
  8. package/lib/constants.js +2 -1
  9. package/lib/generated-structs/OptionalNextjsDistributionProps.d.ts +1 -1
  10. package/lib/generated-structs/OptionalNextjsDistributionProps.js +1 -1
  11. package/lib/index.d.ts +3 -2
  12. package/lib/index.js +8 -2
  13. package/lib/nextjs-api.d.ts +71 -0
  14. package/lib/nextjs-api.js +173 -0
  15. package/lib/nextjs-assets-deployment.js +2 -2
  16. package/lib/nextjs-build/nextjs-build.d.ts +1 -1
  17. package/lib/nextjs-build/nextjs-build.js +2 -2
  18. package/lib/nextjs-compute/nextjs-containers.js +1 -1
  19. package/lib/nextjs-compute/nextjs-functions.d.ts +3 -1
  20. package/lib/nextjs-compute/nextjs-functions.js +11 -10
  21. package/lib/nextjs-distribution.d.ts +2 -2
  22. package/lib/nextjs-distribution.js +2 -2
  23. package/lib/nextjs-file-system.js +1 -1
  24. package/lib/nextjs-post-deploy.js +1 -1
  25. package/lib/nextjs-static-assets.d.ts +0 -4
  26. package/lib/nextjs-static-assets.js +2 -2
  27. package/lib/nextjs-vpc.js +1 -1
  28. package/lib/root-constructs/nextjs-base-construct.d.ts +137 -0
  29. package/lib/root-constructs/nextjs-base-construct.js +112 -0
  30. package/lib/root-constructs/nextjs-global-containers.d.ts +5 -32
  31. package/lib/root-constructs/nextjs-global-containers.js +10 -83
  32. package/lib/root-constructs/nextjs-global-functions.d.ts +5 -32
  33. package/lib/root-constructs/nextjs-global-functions.js +12 -84
  34. package/lib/root-constructs/nextjs-regional-containers.d.ts +5 -21
  35. package/lib/root-constructs/nextjs-regional-containers.js +10 -71
  36. package/lib/root-constructs/nextjs-regional-functions.d.ts +37 -0
  37. package/lib/root-constructs/nextjs-regional-functions.js +58 -0
  38. package/package.json +1 -1
  39. package/lib/root-constructs/nextjs-base-overrides.d.ts +0 -30
  40. package/lib/root-constructs/nextjs-base-overrides.js +0 -3
  41. package/lib/root-constructs/nextjs-base-props.d.ts +0 -64
  42. package/lib/root-constructs/nextjs-base-props.js +0 -3
package/.jsii CHANGED
@@ -3984,7 +3984,7 @@
3984
3984
  },
3985
3985
  "name": "cdk-nextjs",
3986
3986
  "readme": {
3987
- "markdown": "![Version](https://img.shields.io/github/v/release/cdklabs/cdk-nextjs)\n[![npm version](https://img.shields.io/npm/v/cdk-nextjs.svg?style=flat-square)](https://www.npmjs.org/package/cdk-nextjs)\n![License](https://img.shields.io/github/license/cdklabs/cdk-nextjs)\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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). One exception is `NextjsGlobalFunctions` does not currently support [ISR](https://nextjs.org/docs/app/guides/incremental-static-regeneration) - waiting for [Official Next.js Deployment Adapters API](https://github.com/vercel/next.js/discussions/77740).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`.\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 global constructs to decrease latency and reduce compute costs.\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 Elastic File System (EFS)](https://aws.amazon.com/efs/).\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 `NextjsRegionalContainers`).\n\n## Getting Started\n\n1. If you don’t have a Next.js project yet, follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n1. Install [Docker](https://www.docker.com/). We recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby) container engine enabled.\n1. Install [Node.js](https://nodejs.org/en). We recommend the long term support (LTS) version.\n1. Set your [next.config.js](https://nextjs.org/docs/pages/api-reference/next-config-js) [output](https://nextjs.org/docs/pages/api-reference/next-config-js/output) key to `\"standalone\"`. Learn more here about [Standalone Output](https://nextjs.org/docs/pages/api-reference/next-config-js/output#automatically-copying-traced-files).\n1. Setup [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app.\n1. Install the construct package: `npm install cdk-nextjs`\n1. `cdk deploy`\n1. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\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 NextjsStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n healthCheckPath: \"/api/health\",\n buildContext: join(import.meta.dirname, \"..\"),\n });\n }\n}\n\nconst app = new App();\n\nnew NextjsStack(app, \"nextjs\");\n```\n\nSee [examples/](./examples/) for more usage examples.\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#L81))\n\n![NextjsGlobalFunctions](./docs/cdk-nextjs-NextjsGlobalFunctions.png)\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#L76))\n\n![NextjsGlobalContainers](./docs/cdk-nextjs-NextjsGlobalContainers.png)\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![NextjsRegionalContainers](./docs/cdk-nextjs-NextjsRegionalContainers.png)\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 Distrubtion 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\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`, [ALB HTTPS Listener](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)\n- If using `NextjsGlobalContainers`, 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\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#### NAT Gateway and Alternatives\n\n[NAT Gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) enable compute within private subnets to access the internet without directly exposing that compute to the internet. NAT Gateways prevent you from having to manage your own NAT Instances however they cost $0.045/hr/AZ resulting in charge of $64.80/month for 2 AZs (.045 x 24 x 30 x 2). While NAT Gateways are recommended by AWS to ensure maximum reliability and scalability, some customers may desire less expensive alternatives:\n\n1. $0.00 - if you're Next.js app does not need to access the internet, remove the NAT Gateway.\n2. $6.05 - managing your own [NAT Instance](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html). See [examples/low-cost](./examples/low-cost/) for how to use [fck-nat](https://fck-nat.dev/stable/).\n3. $32.40 - use 1 AZ instead of 2.\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=cbabcb1142ad9b29345b82b33b3cf552eddc966a)\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 | 10 GB storage, 750K GET requests | $0.53 |\n| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $3.90 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $69.32 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=1354220e3d611a726139bee4af4277debacd365c)\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 | 10 GB storage, 750K GET requests | $0.53 |\n| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $3.90 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $120.53 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=f53440707350f74cf478ca9e45a3ad32f5e16710)\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| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $4.05 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $138.07 |\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![1K concurrent users](./docs/1k-concurrent-users-executions.png)\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</details>\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 not offer API Gateway version of construct?<br/>\nA: API Gateway does not support streaming.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: Next.js has 3 types of server caching that are persisted to disk: [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache), and [image optimization cache](https://nextjs.org/docs/pages/building-your-application/optimizing/images). By default this cached data is persisted on individual compute instances and is not shared - reducing cache hits. cdk-nextjs uses the [custom Next.js cache handler](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath) for data and full route cache and symlinking for image optimization cache to modify Next.js to read/write from a mounted file system\n\nQ: Why EFS instead of S3?<br/>\nA: cdk-nextjs uses [Amazon Elastic File System (EFS)](https://aws.amazon.com/efs/) to mount a file system to functions or containers as a shared cache. The custom Next.js cache handler could be modified to read/write data to [Amazon S3](https://aws.amazon.com/pm/serv-s3), but there is no way to modify the location of the image optimization cache without modifying Next.js internals. Other factors to compare:\n\n| Factor | EFS | S3 |\n| ----------------------------- | ------------------------- | --------------------- |\n| Performance | 1-10ms per file operation | 100-200ms per request |\n| Cold Start Impact | 50-100ms to mount | No impact |\n| Storage Cost | $0.30 / GB-month | $0.023 / GB-month |\n| Read Throughput/Request Cost | $0.03 / GB-month | $0.04 / M requests |\n| Write Throughput/Request Cost | $0.06 / GB-month | $5.00 / M requests |\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).\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"
3987
+ "markdown": "![Version](https://img.shields.io/github/v/release/cdklabs/cdk-nextjs)\n[![npm version](https://img.shields.io/npm/v/cdk-nextjs.svg?style=flat-square)](https://www.npmjs.org/package/cdk-nextjs)\n![License](https://img.shields.io/github/license/cdklabs/cdk-nextjs)\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n![cdk-constructs: Experimental](https://img.shields.io/badge/cdk--constructs-experimental-important.svg?style=for-the-badge)\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). One exception is `NextjsGlobalFunctions` does not currently support [ISR](https://nextjs.org/docs/app/guides/incremental-static-regeneration) - waiting for [Official Next.js Deployment Adapters API](https://github.com/vercel/next.js/discussions/77740).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`.\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 global constructs to decrease latency and reduce compute costs.\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 Elastic File System (EFS)](https://aws.amazon.com/efs/).\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 `NextjsRegionalContainers`).\n\n## Getting Started\n\n1. If you don’t have a Next.js project yet, follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n1. Install [Docker](https://www.docker.com/). We recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby) container engine enabled.\n1. Install [Node.js](https://nodejs.org/en). We recommend the long term support (LTS) version.\n1. Set your [next.config.js](https://nextjs.org/docs/pages/api-reference/next-config-js) [output](https://nextjs.org/docs/pages/api-reference/next-config-js/output) key to `\"standalone\"`. Learn more here about [Standalone Output](https://nextjs.org/docs/pages/api-reference/next-config-js/output#automatically-copying-traced-files).\n1. Setup [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app.\n1. Install the construct package: `npm install cdk-nextjs`\n1. `cdk deploy`\n1. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\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 NextjsStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n healthCheckPath: \"/api/health\",\n buildContext: join(import.meta.dirname, \"..\"),\n });\n }\n}\n\nconst app = new App();\n\nnew NextjsStack(app, \"nextjs\");\n```\n\nSee [examples/](./examples/) for more usage examples.\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![NextjsGlobalFunctions](./docs/cdk-nextjs-NextjsGlobalFunctions.png)\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![NextjsGlobalContainers](./docs/cdk-nextjs-NextjsGlobalContainers.png)\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![NextjsRegionalContainers](./docs/cdk-nextjs-NextjsRegionalContainers.png)\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![NextjsRegionalFunctions](./docs/cdk-nextjs-NextjsRegionalFunctions.png)\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\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#### NAT Gateway and Alternatives\n\n[NAT Gateways](https://docs.aws.amazon.com/vpc/latest/userguide/vpc-nat-gateway.html) enable compute within private subnets to access the internet without directly exposing that compute to the internet. NAT Gateways prevent you from having to manage your own NAT Instances however they cost $0.045/hr/AZ resulting in charge of $64.80/month for 2 AZs (.045 x 24 x 30 x 2). While NAT Gateways are recommended by AWS to ensure maximum reliability and scalability, some customers may desire less expensive alternatives:\n\n1. $0.00 - if you're Next.js app does not need to access the internet, remove the NAT Gateway.\n2. $6.05 - managing your own [NAT Instance](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Instance.html). See [examples/low-cost](./examples/low-cost/) for how to use [fck-nat](https://fck-nat.dev/stable/).\n3. $32.40 - use 1 AZ instead of 2.\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=cbabcb1142ad9b29345b82b33b3cf552eddc966a)\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 | 10 GB storage, 750K GET requests | $0.53 |\n| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $3.90 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $69.32 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=1354220e3d611a726139bee4af4277debacd365c)\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 | 10 GB storage, 750K GET requests | $0.53 |\n| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $3.90 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $120.53 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=f53440707350f74cf478ca9e45a3ad32f5e16710)\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| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $4.05 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $138.07 |\n\n### NextjsRegionalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=a6d21afbb983c7efa53da096aa608739da113247)\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| EFS | 10 GB storage, 25/2.5 GB Read/Write Throughput | $4.05 |\n| VPC | NAT Gateway, 2 AZs | $64.80 |\n| Total | | $75.85 |\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![1K concurrent users](./docs/1k-concurrent-users-executions.png)\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## 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 not offer API Gateway version of construct?<br/>\nA: API Gateway does not support streaming.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: Next.js has 3 types of server caching that are persisted to disk: [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache), and [image optimization cache](https://nextjs.org/docs/pages/building-your-application/optimizing/images). By default this cached data is persisted on individual compute instances and is not shared - reducing cache hits. cdk-nextjs uses the [custom Next.js cache handler](https://nextjs.org/docs/app/api-reference/next-config-js/incrementalCacheHandlerPath) for data and full route cache and symlinking for image optimization cache to modify Next.js to read/write from a mounted file system\n\nQ: Why EFS instead of S3?<br/>\nA: cdk-nextjs uses [Amazon Elastic File System (EFS)](https://aws.amazon.com/efs/) to mount a file system to functions or containers as a shared cache. The custom Next.js cache handler could be modified to read/write data to [Amazon S3](https://aws.amazon.com/pm/serv-s3), but there is no way to modify the location of the image optimization cache without modifying Next.js internals. Other factors to compare:\n\n| Factor | EFS | S3 |\n| ----------------------------- | ------------------------- | --------------------- |\n| Performance | 1-10ms per file operation | 100-200ms per request |\n| Cold Start Impact | 50-100ms to mount | No impact |\n| Storage Cost | $0.30 / GB-month | $0.023 / GB-month |\n| Read Throughput/Request Cost | $0.03 / GB-month | $0.04 / M requests |\n| Write Throughput/Request Cost | $0.06 / GB-month | $5.00 / M requests |\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).\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"
3988
3988
  },
3989
3989
  "repository": {
3990
3990
  "type": "git",
@@ -4044,83 +4044,123 @@
4044
4044
  ],
4045
4045
  "symbolId": "src/nextjs-file-system:AllowComputeProps"
4046
4046
  },
4047
- "cdk-nextjs.BaseNextjsConstructOverrides": {
4047
+ "cdk-nextjs.BuilderImageProps": {
4048
4048
  "assembly": "cdk-nextjs",
4049
4049
  "datatype": true,
4050
4050
  "docs": {
4051
- "stability": "stable",
4052
- "summary": "Base overrides for the props passed to constructs within root/top-level Next.js constructs."
4051
+ "stability": "stable"
4053
4052
  },
4054
- "fqn": "cdk-nextjs.BaseNextjsConstructOverrides",
4053
+ "fqn": "cdk-nextjs.BuilderImageProps",
4055
4054
  "kind": "interface",
4056
4055
  "locationInModule": {
4057
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4058
- "line": 15
4056
+ "filename": "src/nextjs-build/nextjs-build.ts",
4057
+ "line": 29
4059
4058
  },
4060
- "name": "BaseNextjsConstructOverrides",
4059
+ "name": "BuilderImageProps",
4061
4060
  "properties": [
4062
4061
  {
4063
4062
  "abstract": true,
4064
4063
  "docs": {
4065
- "stability": "stable"
4064
+ "stability": "stable",
4065
+ "summary": "Build Args to be passed to `docker build` command."
4066
4066
  },
4067
4067
  "immutable": true,
4068
4068
  "locationInModule": {
4069
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4070
- "line": 19
4069
+ "filename": "src/nextjs-build/nextjs-build.ts",
4070
+ "line": 33
4071
4071
  },
4072
- "name": "nextjsAssetsDeploymentProps",
4072
+ "name": "buildArgs",
4073
4073
  "optional": true,
4074
4074
  "type": {
4075
- "fqn": "cdk-nextjs.OptionalNextjsAssetsDeploymentProps"
4075
+ "collection": {
4076
+ "elementtype": {
4077
+ "primitive": "string"
4078
+ },
4079
+ "kind": "map"
4080
+ }
4076
4081
  }
4077
4082
  },
4078
4083
  {
4079
4084
  "abstract": true,
4080
4085
  "docs": {
4081
- "stability": "stable"
4086
+ "stability": "stable",
4087
+ "summary": "`docker build ...` command to run in {@link NextBaseProps.buildContext }. Default interpolates other props. If you override, other props will have no effect on command."
4082
4088
  },
4083
4089
  "immutable": true,
4084
4090
  "locationInModule": {
4085
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4086
- "line": 16
4091
+ "filename": "src/nextjs-build/nextjs-build.ts",
4092
+ "line": 39
4087
4093
  },
4088
- "name": "nextjsBuildProps",
4094
+ "name": "command",
4089
4095
  "optional": true,
4090
4096
  "type": {
4091
- "fqn": "cdk-nextjs.OptionalNextjsBuildProps"
4097
+ "primitive": "string"
4092
4098
  }
4093
4099
  },
4094
4100
  {
4095
4101
  "abstract": true,
4096
4102
  "docs": {
4097
- "stability": "stable"
4103
+ "example": "[\"MY_API_KEY\"]",
4104
+ "remarks": "Note, a shell script, cdk-nextjs-load-env-vars.sh is created within the\n{@link NextBaseProps.buildContext } directory, which will contain all the\nenvironment variables defined in this prop. If you've created your own\ncustom Dockerfile (passed in via {@link BuilderImageProps.customDockerfilePath })\nthen you need to make sure you're copying it into the image.",
4105
+ "stability": "stable",
4106
+ "summary": "Environment variables names to pass from host to container during build process."
4098
4107
  },
4099
4108
  "immutable": true,
4100
4109
  "locationInModule": {
4101
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4102
- "line": 18
4110
+ "filename": "src/nextjs-build/nextjs-build.ts",
4111
+ "line": 51
4103
4112
  },
4104
- "name": "nextjsFileSystemProps",
4113
+ "name": "envVarNames",
4105
4114
  "optional": true,
4106
4115
  "type": {
4107
- "fqn": "cdk-nextjs.OptionalNextjsFileSystemProps"
4116
+ "collection": {
4117
+ "elementtype": {
4118
+ "primitive": "string"
4119
+ },
4120
+ "kind": "array"
4121
+ }
4108
4122
  }
4109
4123
  },
4110
4124
  {
4111
4125
  "abstract": true,
4112
4126
  "docs": {
4113
- "stability": "stable"
4127
+ "default": "[\"node_modules\", \".git\", \".gitignore\", \".md\"]",
4128
+ "stability": "stable",
4129
+ "summary": "Lines in .dockerignore file which will be created in your {@link NextBaseProps.buildContext }."
4114
4130
  },
4115
4131
  "immutable": true,
4116
4132
  "locationInModule": {
4117
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4118
- "line": 20
4133
+ "filename": "src/nextjs-build/nextjs-build.ts",
4134
+ "line": 56
4119
4135
  },
4120
- "name": "nextjsPostDeployProps",
4136
+ "name": "exclude",
4121
4137
  "optional": true,
4122
4138
  "type": {
4123
- "fqn": "cdk-nextjs.OptionalNextjsPostDeployProps"
4139
+ "collection": {
4140
+ "elementtype": {
4141
+ "primitive": "string"
4142
+ },
4143
+ "kind": "array"
4144
+ }
4145
+ }
4146
+ },
4147
+ {
4148
+ "abstract": true,
4149
+ "docs": {
4150
+ "default": "\"builder.Dockerfile\"",
4151
+ "remarks": "If specified, you are responsible\nfor ensuring it exists in build context before construct is instantiated.",
4152
+ "stability": "stable",
4153
+ "summary": "Name of Dockerfile in builder build context."
4154
+ },
4155
+ "immutable": true,
4156
+ "locationInModule": {
4157
+ "filename": "src/nextjs-build/nextjs-build.ts",
4158
+ "line": 62
4159
+ },
4160
+ "name": "file",
4161
+ "optional": true,
4162
+ "type": {
4163
+ "primitive": "string"
4124
4164
  }
4125
4165
  },
4126
4166
  {
@@ -4130,49 +4170,112 @@
4130
4170
  },
4131
4171
  "immutable": true,
4132
4172
  "locationInModule": {
4133
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4134
- "line": 17
4173
+ "filename": "src/nextjs-build/nextjs-build.ts",
4174
+ "line": 63
4135
4175
  },
4136
- "name": "nextjsVpcProps",
4176
+ "name": "platform",
4137
4177
  "optional": true,
4138
4178
  "type": {
4139
- "fqn": "cdk-nextjs.OptionalNextjsVpcProps"
4179
+ "fqn": "aws-cdk-lib.aws_ecr_assets.Platform"
4180
+ }
4181
+ },
4182
+ {
4183
+ "abstract": true,
4184
+ "docs": {
4185
+ "default": "false",
4186
+ "stability": "stable",
4187
+ "summary": "Skip building the builder image."
4188
+ },
4189
+ "immutable": true,
4190
+ "locationInModule": {
4191
+ "filename": "src/nextjs-build/nextjs-build.ts",
4192
+ "line": 68
4193
+ },
4194
+ "name": "skipBuild",
4195
+ "optional": true,
4196
+ "type": {
4197
+ "primitive": "boolean"
4140
4198
  }
4141
4199
  }
4142
4200
  ],
4143
- "symbolId": "src/root-constructs/nextjs-base-overrides:BaseNextjsConstructOverrides"
4201
+ "symbolId": "src/nextjs-build/nextjs-build:BuilderImageProps"
4144
4202
  },
4145
- "cdk-nextjs.BaseNextjsOverrides": {
4203
+ "cdk-nextjs.NextjsApi": {
4146
4204
  "assembly": "cdk-nextjs",
4147
- "datatype": true,
4205
+ "base": "constructs.Construct",
4148
4206
  "docs": {
4149
4207
  "stability": "stable",
4150
- "summary": "Base overrides for constructs shared between all root/top-level Next.js constructs."
4208
+ "summary": "Creates an API Gateway REST API for Next.js applications."
4151
4209
  },
4152
- "fqn": "cdk-nextjs.BaseNextjsOverrides",
4153
- "kind": "interface",
4210
+ "fqn": "cdk-nextjs.NextjsApi",
4211
+ "initializer": {
4212
+ "docs": {
4213
+ "stability": "stable"
4214
+ },
4215
+ "locationInModule": {
4216
+ "filename": "src/nextjs-api.ts",
4217
+ "line": 74
4218
+ },
4219
+ "parameters": [
4220
+ {
4221
+ "name": "scope",
4222
+ "type": {
4223
+ "fqn": "constructs.Construct"
4224
+ }
4225
+ },
4226
+ {
4227
+ "name": "id",
4228
+ "type": {
4229
+ "primitive": "string"
4230
+ }
4231
+ },
4232
+ {
4233
+ "name": "props",
4234
+ "type": {
4235
+ "fqn": "cdk-nextjs.NextjsApiProps"
4236
+ }
4237
+ }
4238
+ ]
4239
+ },
4240
+ "kind": "class",
4154
4241
  "locationInModule": {
4155
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4156
- "line": 26
4242
+ "filename": "src/nextjs-api.ts",
4243
+ "line": 64
4157
4244
  },
4158
- "name": "BaseNextjsOverrides",
4245
+ "name": "NextjsApi",
4159
4246
  "properties": [
4160
4247
  {
4161
- "abstract": true,
4162
4248
  "docs": {
4163
- "stability": "stable"
4249
+ "stability": "stable",
4250
+ "summary": "The API Gateway REST API."
4164
4251
  },
4165
4252
  "immutable": true,
4166
4253
  "locationInModule": {
4167
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4168
- "line": 30
4254
+ "filename": "src/nextjs-api.ts",
4255
+ "line": 68
4169
4256
  },
4170
- "name": "nextjsAssetsDeployment",
4171
- "optional": true,
4257
+ "name": "api",
4172
4258
  "type": {
4173
- "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides"
4259
+ "fqn": "aws-cdk-lib.aws_apigateway.RestApi"
4174
4260
  }
4175
- },
4261
+ }
4262
+ ],
4263
+ "symbolId": "src/nextjs-api:NextjsApi"
4264
+ },
4265
+ "cdk-nextjs.NextjsApiOverrides": {
4266
+ "assembly": "cdk-nextjs",
4267
+ "datatype": true,
4268
+ "docs": {
4269
+ "stability": "stable"
4270
+ },
4271
+ "fqn": "cdk-nextjs.NextjsApiOverrides",
4272
+ "kind": "interface",
4273
+ "locationInModule": {
4274
+ "filename": "src/nextjs-api.ts",
4275
+ "line": 26
4276
+ },
4277
+ "name": "NextjsApiOverrides",
4278
+ "properties": [
4176
4279
  {
4177
4280
  "abstract": true,
4178
4281
  "docs": {
@@ -4180,13 +4283,13 @@
4180
4283
  },
4181
4284
  "immutable": true,
4182
4285
  "locationInModule": {
4183
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4184
- "line": 27
4286
+ "filename": "src/nextjs-api.ts",
4287
+ "line": 30
4185
4288
  },
4186
- "name": "nextjsBuild",
4289
+ "name": "dynamicIntegrationProps",
4187
4290
  "optional": true,
4188
4291
  "type": {
4189
- "fqn": "cdk-nextjs.NextjsBuildOverrides"
4292
+ "fqn": "aws-cdk-lib.aws_apigateway.LambdaIntegrationOptions"
4190
4293
  }
4191
4294
  },
4192
4295
  {
@@ -4196,13 +4299,13 @@
4196
4299
  },
4197
4300
  "immutable": true,
4198
4301
  "locationInModule": {
4199
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4200
- "line": 28
4302
+ "filename": "src/nextjs-api.ts",
4303
+ "line": 27
4201
4304
  },
4202
- "name": "nextjsFileSystem",
4305
+ "name": "restApiProps",
4203
4306
  "optional": true,
4204
4307
  "type": {
4205
- "fqn": "cdk-nextjs.NextjsFileSystemOverrides"
4308
+ "fqn": "aws-cdk-lib.aws_apigateway.RestApiProps"
4206
4309
  }
4207
4310
  },
4208
4311
  {
@@ -4212,13 +4315,13 @@
4212
4315
  },
4213
4316
  "immutable": true,
4214
4317
  "locationInModule": {
4215
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4216
- "line": 31
4318
+ "filename": "src/nextjs-api.ts",
4319
+ "line": 29
4217
4320
  },
4218
- "name": "nextjsPostDeploy",
4321
+ "name": "s3MethodOptions",
4219
4322
  "optional": true,
4220
4323
  "type": {
4221
- "fqn": "cdk-nextjs.NextjsPostDeployOverrides"
4324
+ "fqn": "aws-cdk-lib.aws_apigateway.MethodOptions"
4222
4325
  }
4223
4326
  },
4224
4327
  {
@@ -4228,51 +4331,50 @@
4228
4331
  },
4229
4332
  "immutable": true,
4230
4333
  "locationInModule": {
4231
- "filename": "src/root-constructs/nextjs-base-overrides.ts",
4232
- "line": 29
4334
+ "filename": "src/nextjs-api.ts",
4335
+ "line": 28
4233
4336
  },
4234
- "name": "nextjsVpc",
4337
+ "name": "staticIntegrationProps",
4235
4338
  "optional": true,
4236
4339
  "type": {
4237
- "fqn": "cdk-nextjs.NextjsVpcOverrides"
4340
+ "fqn": "aws-cdk-lib.aws_apigateway.AwsIntegrationProps"
4238
4341
  }
4239
4342
  }
4240
4343
  ],
4241
- "symbolId": "src/root-constructs/nextjs-base-overrides:BaseNextjsOverrides"
4344
+ "symbolId": "src/nextjs-api:NextjsApiOverrides"
4242
4345
  },
4243
- "cdk-nextjs.BuilderImageProps": {
4346
+ "cdk-nextjs.NextjsApiProps": {
4244
4347
  "assembly": "cdk-nextjs",
4245
4348
  "datatype": true,
4246
4349
  "docs": {
4247
4350
  "stability": "stable"
4248
4351
  },
4249
- "fqn": "cdk-nextjs.BuilderImageProps",
4352
+ "fqn": "cdk-nextjs.NextjsApiProps",
4250
4353
  "kind": "interface",
4251
4354
  "locationInModule": {
4252
- "filename": "src/nextjs-build/nextjs-build.ts",
4253
- "line": 29
4355
+ "filename": "src/nextjs-api.ts",
4356
+ "line": 33
4254
4357
  },
4255
- "name": "BuilderImageProps",
4358
+ "name": "NextjsApiProps",
4256
4359
  "properties": [
4257
4360
  {
4258
4361
  "abstract": true,
4259
4362
  "docs": {
4260
4363
  "stability": "stable",
4261
- "summary": "Build Args to be passed to `docker build` command."
4364
+ "summary": "Path to directory of Next.js app's public directory. Used to add resources to API Gateway REST API for public directory to go directly to S3."
4262
4365
  },
4263
4366
  "immutable": true,
4264
4367
  "locationInModule": {
4265
- "filename": "src/nextjs-build/nextjs-build.ts",
4266
- "line": 33
4368
+ "filename": "src/nextjs-api.ts",
4369
+ "line": 46
4267
4370
  },
4268
- "name": "buildArgs",
4269
- "optional": true,
4371
+ "name": "publicDirEntries",
4270
4372
  "type": {
4271
4373
  "collection": {
4272
4374
  "elementtype": {
4273
- "primitive": "string"
4375
+ "fqn": "cdk-nextjs.PublicDirEntry"
4274
4376
  },
4275
- "kind": "map"
4377
+ "kind": "array"
4276
4378
  }
4277
4379
  }
4278
4380
  },
@@ -4280,259 +4382,648 @@
4280
4382
  "abstract": true,
4281
4383
  "docs": {
4282
4384
  "stability": "stable",
4283
- "summary": "`docker build ...` command to run in {@link NextBaseProps.buildContext }. Default interpolates other props. If you override, other props will have no effect on command."
4385
+ "summary": "The S3 bucket containing static assets."
4284
4386
  },
4285
4387
  "immutable": true,
4286
4388
  "locationInModule": {
4287
- "filename": "src/nextjs-build/nextjs-build.ts",
4288
- "line": 39
4389
+ "filename": "src/nextjs-api.ts",
4390
+ "line": 54
4289
4391
  },
4290
- "name": "command",
4291
- "optional": true,
4392
+ "name": "staticAssetsBucket",
4292
4393
  "type": {
4293
- "primitive": "string"
4394
+ "fqn": "aws-cdk-lib.aws_s3.IBucket"
4294
4395
  }
4295
4396
  },
4296
4397
  {
4297
4398
  "abstract": true,
4298
4399
  "docs": {
4299
- "example": "[\"MY_API_KEY\"]",
4300
- "remarks": "Note, a shell script, cdk-nextjs-load-env-vars.sh is created within the\n{@link NextBaseProps.buildContext } directory, which will contain all the\nenvironment variables defined in this prop. If you've created your own\ncustom Dockerfile (passed in via {@link BuilderImageProps.customDockerfilePath })\nthen you need to make sure you're copying it into the image.",
4301
4400
  "stability": "stable",
4302
- "summary": "Environment variables names to pass from host to container during build process."
4401
+ "summary": "Optional base path for the application."
4303
4402
  },
4304
4403
  "immutable": true,
4305
4404
  "locationInModule": {
4306
- "filename": "src/nextjs-build/nextjs-build.ts",
4307
- "line": 51
4405
+ "filename": "src/nextjs-api.ts",
4406
+ "line": 37
4308
4407
  },
4309
- "name": "envVarNames",
4408
+ "name": "basePath",
4310
4409
  "optional": true,
4311
4410
  "type": {
4312
- "collection": {
4313
- "elementtype": {
4314
- "primitive": "string"
4315
- },
4316
- "kind": "array"
4317
- }
4411
+ "primitive": "string"
4318
4412
  }
4319
4413
  },
4320
4414
  {
4321
4415
  "abstract": true,
4322
4416
  "docs": {
4323
- "default": "[\"node_modules\", \".git\", \".gitignore\", \".md\"]",
4324
4417
  "stability": "stable",
4325
- "summary": "Lines in .dockerignore file which will be created in your {@link NextBaseProps.buildContext }."
4418
+ "summary": "Override props for every construct."
4326
4419
  },
4327
4420
  "immutable": true,
4328
4421
  "locationInModule": {
4329
- "filename": "src/nextjs-build/nextjs-build.ts",
4330
- "line": 56
4422
+ "filename": "src/nextjs-api.ts",
4423
+ "line": 41
4331
4424
  },
4332
- "name": "exclude",
4425
+ "name": "overrides",
4333
4426
  "optional": true,
4334
4427
  "type": {
4335
- "collection": {
4336
- "elementtype": {
4337
- "primitive": "string"
4338
- },
4339
- "kind": "array"
4340
- }
4428
+ "fqn": "cdk-nextjs.NextjsApiOverrides"
4341
4429
  }
4342
4430
  },
4343
4431
  {
4344
4432
  "abstract": true,
4345
4433
  "docs": {
4346
- "default": "\"builder.Dockerfile\"",
4347
- "remarks": "If specified, you are responsible\nfor ensuring it exists in build context before construct is instantiated.",
4434
+ "remarks": "The Lambda function for server-side rendering",
4348
4435
  "stability": "stable",
4349
- "summary": "Name of Dockerfile in builder build context."
4436
+ "summary": "Required if `NextjsRegionalFunctions`."
4350
4437
  },
4351
4438
  "immutable": true,
4352
4439
  "locationInModule": {
4353
- "filename": "src/nextjs-build/nextjs-build.ts",
4354
- "line": 62
4440
+ "filename": "src/nextjs-api.ts",
4441
+ "line": 50
4355
4442
  },
4356
- "name": "file",
4443
+ "name": "serverFunction",
4357
4444
  "optional": true,
4358
4445
  "type": {
4359
- "primitive": "string"
4446
+ "fqn": "aws-cdk-lib.aws_lambda.IFunction"
4360
4447
  }
4361
4448
  },
4362
4449
  {
4363
4450
  "abstract": true,
4364
4451
  "docs": {
4365
- "stability": "stable"
4452
+ "remarks": "VPC to create VPC Link and ECS Service Discovery",
4453
+ "stability": "stable",
4454
+ "summary": "[Future] Required if `NextjsRegionalContainers`."
4366
4455
  },
4367
4456
  "immutable": true,
4368
4457
  "locationInModule": {
4369
- "filename": "src/nextjs-build/nextjs-build.ts",
4370
- "line": 63
4458
+ "filename": "src/nextjs-api.ts",
4459
+ "line": 58
4371
4460
  },
4372
- "name": "platform",
4461
+ "name": "vpc",
4373
4462
  "optional": true,
4374
4463
  "type": {
4375
- "fqn": "aws-cdk-lib.aws_ecr_assets.Platform"
4464
+ "fqn": "aws-cdk-lib.aws_ec2.IVpc"
4376
4465
  }
4377
- },
4466
+ }
4467
+ ],
4468
+ "symbolId": "src/nextjs-api:NextjsApiProps"
4469
+ },
4470
+ "cdk-nextjs.NextjsAssetDeploymentOverrides": {
4471
+ "assembly": "cdk-nextjs",
4472
+ "datatype": true,
4473
+ "docs": {
4474
+ "stability": "stable"
4475
+ },
4476
+ "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides",
4477
+ "kind": "interface",
4478
+ "locationInModule": {
4479
+ "filename": "src/nextjs-assets-deployment.ts",
4480
+ "line": 27
4481
+ },
4482
+ "name": "NextjsAssetDeploymentOverrides",
4483
+ "properties": [
4378
4484
  {
4379
4485
  "abstract": true,
4380
4486
  "docs": {
4381
- "default": "false",
4382
4487
  "stability": "stable",
4383
- "summary": "Skip building the builder image."
4488
+ "summary": "Props that define the custom resource."
4384
4489
  },
4385
4490
  "immutable": true,
4386
4491
  "locationInModule": {
4387
- "filename": "src/nextjs-build/nextjs-build.ts",
4388
- "line": 68
4492
+ "filename": "src/nextjs-assets-deployment.ts",
4493
+ "line": 31
4389
4494
  },
4390
- "name": "skipBuild",
4495
+ "name": "customResourceProps",
4391
4496
  "optional": true,
4392
4497
  "type": {
4393
- "primitive": "boolean"
4498
+ "fqn": "cdk-nextjs.OptionalCustomResourceProps"
4499
+ }
4500
+ },
4501
+ {
4502
+ "abstract": true,
4503
+ "docs": {
4504
+ "stability": "stable"
4505
+ },
4506
+ "immutable": true,
4507
+ "locationInModule": {
4508
+ "filename": "src/nextjs-assets-deployment.ts",
4509
+ "line": 34
4510
+ },
4511
+ "name": "dockerImageFunctionProps",
4512
+ "optional": true,
4513
+ "type": {
4514
+ "fqn": "cdk-nextjs.OptionalDockerImageFunctionProps"
4394
4515
  }
4395
4516
  }
4396
4517
  ],
4397
- "symbolId": "src/nextjs-build/nextjs-build:BuilderImageProps"
4518
+ "symbolId": "src/nextjs-assets-deployment:NextjsAssetDeploymentOverrides"
4398
4519
  },
4399
- "cdk-nextjs.NextjsAssetDeploymentOverrides": {
4520
+ "cdk-nextjs.NextjsAssetsDeployment": {
4521
+ "assembly": "cdk-nextjs",
4522
+ "base": "constructs.Construct",
4523
+ "docs": {
4524
+ "stability": "stable",
4525
+ "summary": "Deploys static assets to S3 and cache assets to EFS in Lambda Custom Resource."
4526
+ },
4527
+ "fqn": "cdk-nextjs.NextjsAssetsDeployment",
4528
+ "initializer": {
4529
+ "docs": {
4530
+ "stability": "stable"
4531
+ },
4532
+ "locationInModule": {
4533
+ "filename": "src/nextjs-assets-deployment.ts",
4534
+ "line": 110
4535
+ },
4536
+ "parameters": [
4537
+ {
4538
+ "name": "scope",
4539
+ "type": {
4540
+ "fqn": "constructs.Construct"
4541
+ }
4542
+ },
4543
+ {
4544
+ "name": "id",
4545
+ "type": {
4546
+ "primitive": "string"
4547
+ }
4548
+ },
4549
+ {
4550
+ "name": "props",
4551
+ "type": {
4552
+ "fqn": "cdk-nextjs.NextjsAssetsDeploymentProps"
4553
+ }
4554
+ }
4555
+ ]
4556
+ },
4557
+ "kind": "class",
4558
+ "locationInModule": {
4559
+ "filename": "src/nextjs-assets-deployment.ts",
4560
+ "line": 104
4561
+ },
4562
+ "name": "NextjsAssetsDeployment",
4563
+ "properties": [
4564
+ {
4565
+ "docs": {
4566
+ "stability": "stable"
4567
+ },
4568
+ "locationInModule": {
4569
+ "filename": "src/nextjs-assets-deployment.ts",
4570
+ "line": 105
4571
+ },
4572
+ "name": "customResource",
4573
+ "type": {
4574
+ "fqn": "aws-cdk-lib.CustomResource"
4575
+ }
4576
+ },
4577
+ {
4578
+ "docs": {
4579
+ "stability": "stable"
4580
+ },
4581
+ "locationInModule": {
4582
+ "filename": "src/nextjs-assets-deployment.ts",
4583
+ "line": 106
4584
+ },
4585
+ "name": "dockerImageFunction",
4586
+ "type": {
4587
+ "fqn": "aws-cdk-lib.aws_lambda.DockerImageFunction"
4588
+ }
4589
+ }
4590
+ ],
4591
+ "symbolId": "src/nextjs-assets-deployment:NextjsAssetsDeployment"
4592
+ },
4593
+ "cdk-nextjs.NextjsAssetsDeploymentProps": {
4400
4594
  "assembly": "cdk-nextjs",
4401
4595
  "datatype": true,
4402
4596
  "docs": {
4403
4597
  "stability": "stable"
4404
4598
  },
4405
- "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides",
4599
+ "fqn": "cdk-nextjs.NextjsAssetsDeploymentProps",
4406
4600
  "kind": "interface",
4407
4601
  "locationInModule": {
4408
4602
  "filename": "src/nextjs-assets-deployment.ts",
4409
- "line": 27
4603
+ "line": 37
4410
4604
  },
4411
- "name": "NextjsAssetDeploymentOverrides",
4605
+ "name": "NextjsAssetsDeploymentProps",
4412
4606
  "properties": [
4413
4607
  {
4414
- "abstract": true,
4608
+ "abstract": true,
4609
+ "docs": {
4610
+ "stability": "stable"
4611
+ },
4612
+ "immutable": true,
4613
+ "locationInModule": {
4614
+ "filename": "src/nextjs-assets-deployment.ts",
4615
+ "line": 38
4616
+ },
4617
+ "name": "accessPoint",
4618
+ "type": {
4619
+ "fqn": "aws-cdk-lib.aws_efs.AccessPoint"
4620
+ }
4621
+ },
4622
+ {
4623
+ "abstract": true,
4624
+ "docs": {
4625
+ "stability": "stable"
4626
+ },
4627
+ "immutable": true,
4628
+ "locationInModule": {
4629
+ "filename": "src/nextjs-assets-deployment.ts",
4630
+ "line": 44
4631
+ },
4632
+ "name": "buildId",
4633
+ "type": {
4634
+ "primitive": "string"
4635
+ }
4636
+ },
4637
+ {
4638
+ "abstract": true,
4639
+ "docs": {
4640
+ "see": "{@link NextjsBuild.buildImageDigest }",
4641
+ "stability": "stable"
4642
+ },
4643
+ "immutable": true,
4644
+ "locationInModule": {
4645
+ "filename": "src/nextjs-assets-deployment.ts",
4646
+ "line": 48
4647
+ },
4648
+ "name": "buildImageDigest",
4649
+ "type": {
4650
+ "primitive": "string"
4651
+ }
4652
+ },
4653
+ {
4654
+ "abstract": true,
4655
+ "docs": {
4656
+ "stability": "stable"
4657
+ },
4658
+ "immutable": true,
4659
+ "locationInModule": {
4660
+ "filename": "src/nextjs-assets-deployment.ts",
4661
+ "line": 54
4662
+ },
4663
+ "name": "dockerImageCode",
4664
+ "type": {
4665
+ "fqn": "aws-cdk-lib.aws_lambda.DockerImageCode"
4666
+ }
4667
+ },
4668
+ {
4669
+ "abstract": true,
4670
+ "docs": {
4671
+ "stability": "stable"
4672
+ },
4673
+ "immutable": true,
4674
+ "locationInModule": {
4675
+ "filename": "src/nextjs-assets-deployment.ts",
4676
+ "line": 55
4677
+ },
4678
+ "name": "nextjsType",
4679
+ "type": {
4680
+ "fqn": "cdk-nextjs.NextjsType"
4681
+ }
4682
+ },
4683
+ {
4684
+ "abstract": true,
4685
+ "docs": {
4686
+ "stability": "stable"
4687
+ },
4688
+ "immutable": true,
4689
+ "locationInModule": {
4690
+ "filename": "src/nextjs-assets-deployment.ts",
4691
+ "line": 65
4692
+ },
4693
+ "name": "vpc",
4694
+ "type": {
4695
+ "fqn": "aws-cdk-lib.aws_ec2.IVpc"
4696
+ }
4697
+ },
4698
+ {
4699
+ "abstract": true,
4700
+ "docs": {
4701
+ "example": "\"/my-base-path\"",
4702
+ "stability": "stable",
4703
+ "summary": "Prefix to the URI path the app will be served at."
4704
+ },
4705
+ "immutable": true,
4706
+ "locationInModule": {
4707
+ "filename": "src/nextjs-assets-deployment.ts",
4708
+ "line": 43
4709
+ },
4710
+ "name": "basePath",
4711
+ "optional": true,
4712
+ "type": {
4713
+ "primitive": "string"
4714
+ }
4715
+ },
4716
+ {
4717
+ "abstract": true,
4718
+ "docs": {
4719
+ "default": "true",
4720
+ "stability": "stable",
4721
+ "summary": "If true, logs details in custom resource lambda."
4722
+ },
4723
+ "immutable": true,
4724
+ "locationInModule": {
4725
+ "filename": "src/nextjs-assets-deployment.ts",
4726
+ "line": 53
4727
+ },
4728
+ "name": "debug",
4729
+ "optional": true,
4730
+ "type": {
4731
+ "primitive": "boolean"
4732
+ }
4733
+ },
4734
+ {
4735
+ "abstract": true,
4736
+ "docs": {
4737
+ "stability": "stable"
4738
+ },
4739
+ "immutable": true,
4740
+ "locationInModule": {
4741
+ "filename": "src/nextjs-assets-deployment.ts",
4742
+ "line": 56
4743
+ },
4744
+ "name": "overrides",
4745
+ "optional": true,
4746
+ "type": {
4747
+ "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides"
4748
+ }
4749
+ },
4750
+ {
4751
+ "abstract": true,
4752
+ "docs": {
4753
+ "see": "{@link NextjsBaseProps.relativePathToPackage }",
4754
+ "stability": "stable"
4755
+ },
4756
+ "immutable": true,
4757
+ "locationInModule": {
4758
+ "filename": "src/nextjs-assets-deployment.ts",
4759
+ "line": 60
4760
+ },
4761
+ "name": "relativePathToPackage",
4762
+ "optional": true,
4763
+ "type": {
4764
+ "primitive": "string"
4765
+ }
4766
+ },
4767
+ {
4768
+ "abstract": true,
4769
+ "docs": {
4770
+ "stability": "stable",
4771
+ "summary": "Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`."
4772
+ },
4773
+ "immutable": true,
4774
+ "locationInModule": {
4775
+ "filename": "src/nextjs-assets-deployment.ts",
4776
+ "line": 64
4777
+ },
4778
+ "name": "staticAssetsBucket",
4779
+ "optional": true,
4780
+ "type": {
4781
+ "fqn": "aws-cdk-lib.aws_s3.Bucket"
4782
+ }
4783
+ }
4784
+ ],
4785
+ "symbolId": "src/nextjs-assets-deployment:NextjsAssetsDeploymentProps"
4786
+ },
4787
+ "cdk-nextjs.NextjsBaseConstruct": {
4788
+ "abstract": true,
4789
+ "assembly": "cdk-nextjs",
4790
+ "base": "constructs.Construct",
4791
+ "docs": {
4792
+ "stability": "stable",
4793
+ "summary": "Base class for all Next.js root constructs."
4794
+ },
4795
+ "fqn": "cdk-nextjs.NextjsBaseConstruct",
4796
+ "initializer": {
4797
+ "docs": {
4798
+ "stability": "stable"
4799
+ },
4800
+ "locationInModule": {
4801
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4802
+ "line": 152
4803
+ },
4804
+ "parameters": [
4805
+ {
4806
+ "name": "scope",
4807
+ "type": {
4808
+ "fqn": "constructs.Construct"
4809
+ }
4810
+ },
4811
+ {
4812
+ "name": "id",
4813
+ "type": {
4814
+ "primitive": "string"
4815
+ }
4816
+ },
4817
+ {
4818
+ "name": "props",
4819
+ "type": {
4820
+ "fqn": "cdk-nextjs.NextjsBaseConstructProps"
4821
+ }
4822
+ },
4823
+ {
4824
+ "name": "nextjsType",
4825
+ "type": {
4826
+ "fqn": "cdk-nextjs.NextjsType"
4827
+ }
4828
+ }
4829
+ ]
4830
+ },
4831
+ "kind": "class",
4832
+ "locationInModule": {
4833
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4834
+ "line": 137
4835
+ },
4836
+ "name": "NextjsBaseConstruct",
4837
+ "properties": [
4838
+ {
4839
+ "docs": {
4840
+ "stability": "stable"
4841
+ },
4842
+ "immutable": true,
4843
+ "locationInModule": {
4844
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4845
+ "line": 149
4846
+ },
4847
+ "name": "baseProps",
4848
+ "protected": true,
4849
+ "type": {
4850
+ "fqn": "cdk-nextjs.NextjsBaseConstructProps"
4851
+ }
4852
+ },
4853
+ {
4854
+ "docs": {
4855
+ "stability": "stable"
4856
+ },
4857
+ "immutable": true,
4858
+ "locationInModule": {
4859
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4860
+ "line": 147
4861
+ },
4862
+ "name": "nextjsType",
4863
+ "protected": true,
4864
+ "type": {
4865
+ "fqn": "cdk-nextjs.NextjsType"
4866
+ }
4867
+ },
4868
+ {
4869
+ "abstract": true,
4870
+ "docs": {
4871
+ "stability": "stable"
4872
+ },
4873
+ "immutable": true,
4874
+ "locationInModule": {
4875
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4876
+ "line": 145
4877
+ },
4878
+ "name": "url",
4879
+ "type": {
4880
+ "primitive": "string"
4881
+ }
4882
+ },
4883
+ {
4884
+ "docs": {
4885
+ "stability": "stable"
4886
+ },
4887
+ "immutable": true,
4888
+ "locationInModule": {
4889
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4890
+ "line": 150
4891
+ },
4892
+ "name": "constructOverrides",
4893
+ "optional": true,
4894
+ "protected": true,
4895
+ "type": {
4896
+ "fqn": "cdk-nextjs.NextjsBaseConstructOverrides"
4897
+ }
4898
+ },
4899
+ {
4900
+ "docs": {
4901
+ "stability": "stable"
4902
+ },
4903
+ "locationInModule": {
4904
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4905
+ "line": 142
4906
+ },
4907
+ "name": "nextjsAssetsDeployment",
4908
+ "type": {
4909
+ "fqn": "cdk-nextjs.NextjsAssetsDeployment"
4910
+ }
4911
+ },
4912
+ {
4913
+ "docs": {
4914
+ "stability": "stable"
4915
+ },
4916
+ "locationInModule": {
4917
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4918
+ "line": 138
4919
+ },
4920
+ "name": "nextjsBuild",
4921
+ "type": {
4922
+ "fqn": "cdk-nextjs.NextjsBuild"
4923
+ }
4924
+ },
4925
+ {
4926
+ "docs": {
4927
+ "stability": "stable"
4928
+ },
4929
+ "locationInModule": {
4930
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4931
+ "line": 141
4932
+ },
4933
+ "name": "nextjsFileSystem",
4934
+ "type": {
4935
+ "fqn": "cdk-nextjs.NextjsFileSystem"
4936
+ }
4937
+ },
4938
+ {
4939
+ "docs": {
4940
+ "stability": "stable"
4941
+ },
4942
+ "locationInModule": {
4943
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4944
+ "line": 143
4945
+ },
4946
+ "name": "nextjsPostDeploy",
4947
+ "type": {
4948
+ "fqn": "cdk-nextjs.NextjsPostDeploy"
4949
+ }
4950
+ },
4951
+ {
4415
4952
  "docs": {
4416
- "stability": "stable",
4417
- "summary": "Props that define the custom resource."
4953
+ "stability": "stable"
4418
4954
  },
4419
- "immutable": true,
4420
4955
  "locationInModule": {
4421
- "filename": "src/nextjs-assets-deployment.ts",
4422
- "line": 31
4956
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4957
+ "line": 139
4423
4958
  },
4424
- "name": "customResourceProps",
4425
- "optional": true,
4959
+ "name": "nextjsStaticAssets",
4426
4960
  "type": {
4427
- "fqn": "cdk-nextjs.OptionalCustomResourceProps"
4961
+ "fqn": "cdk-nextjs.NextjsStaticAssets"
4428
4962
  }
4429
4963
  },
4430
4964
  {
4431
- "abstract": true,
4432
4965
  "docs": {
4433
4966
  "stability": "stable"
4434
4967
  },
4435
- "immutable": true,
4436
4968
  "locationInModule": {
4437
- "filename": "src/nextjs-assets-deployment.ts",
4438
- "line": 34
4969
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4970
+ "line": 140
4439
4971
  },
4440
- "name": "dockerImageFunctionProps",
4441
- "optional": true,
4972
+ "name": "nextjsVpc",
4442
4973
  "type": {
4443
- "fqn": "cdk-nextjs.OptionalDockerImageFunctionProps"
4974
+ "fqn": "cdk-nextjs.NextjsVpc"
4444
4975
  }
4445
4976
  }
4446
4977
  ],
4447
- "symbolId": "src/nextjs-assets-deployment:NextjsAssetDeploymentOverrides"
4978
+ "symbolId": "src/root-constructs/nextjs-base-construct:NextjsBaseConstruct"
4448
4979
  },
4449
- "cdk-nextjs.NextjsAssetsDeployment": {
4980
+ "cdk-nextjs.NextjsBaseConstructOverrides": {
4450
4981
  "assembly": "cdk-nextjs",
4451
- "base": "constructs.Construct",
4982
+ "datatype": true,
4452
4983
  "docs": {
4453
4984
  "stability": "stable",
4454
- "summary": "Deploys static assets to S3 and cache assets to EFS in Lambda Custom Resource."
4455
- },
4456
- "fqn": "cdk-nextjs.NextjsAssetsDeployment",
4457
- "initializer": {
4458
- "docs": {
4459
- "stability": "stable"
4460
- },
4461
- "locationInModule": {
4462
- "filename": "src/nextjs-assets-deployment.ts",
4463
- "line": 110
4464
- },
4465
- "parameters": [
4466
- {
4467
- "name": "scope",
4468
- "type": {
4469
- "fqn": "constructs.Construct"
4470
- }
4471
- },
4472
- {
4473
- "name": "id",
4474
- "type": {
4475
- "primitive": "string"
4476
- }
4477
- },
4478
- {
4479
- "name": "props",
4480
- "type": {
4481
- "fqn": "cdk-nextjs.NextjsAssetsDeploymentProps"
4482
- }
4483
- }
4484
- ]
4985
+ "summary": "Base overrides for the props passed to constructs within root/top-level Next.js constructs."
4485
4986
  },
4486
- "kind": "class",
4987
+ "fqn": "cdk-nextjs.NextjsBaseConstructOverrides",
4988
+ "kind": "interface",
4487
4989
  "locationInModule": {
4488
- "filename": "src/nextjs-assets-deployment.ts",
4489
- "line": 104
4990
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4991
+ "line": 35
4490
4992
  },
4491
- "name": "NextjsAssetsDeployment",
4993
+ "name": "NextjsBaseConstructOverrides",
4492
4994
  "properties": [
4493
4995
  {
4996
+ "abstract": true,
4494
4997
  "docs": {
4495
4998
  "stability": "stable"
4496
4999
  },
5000
+ "immutable": true,
4497
5001
  "locationInModule": {
4498
- "filename": "src/nextjs-assets-deployment.ts",
4499
- "line": 105
5002
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5003
+ "line": 39
4500
5004
  },
4501
- "name": "customResource",
5005
+ "name": "nextjsAssetsDeploymentProps",
5006
+ "optional": true,
4502
5007
  "type": {
4503
- "fqn": "aws-cdk-lib.CustomResource"
5008
+ "fqn": "cdk-nextjs.OptionalNextjsAssetsDeploymentProps"
4504
5009
  }
4505
5010
  },
4506
5011
  {
5012
+ "abstract": true,
4507
5013
  "docs": {
4508
5014
  "stability": "stable"
4509
5015
  },
5016
+ "immutable": true,
4510
5017
  "locationInModule": {
4511
- "filename": "src/nextjs-assets-deployment.ts",
4512
- "line": 106
5018
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5019
+ "line": 36
4513
5020
  },
4514
- "name": "dockerImageFunction",
5021
+ "name": "nextjsBuildProps",
5022
+ "optional": true,
4515
5023
  "type": {
4516
- "fqn": "aws-cdk-lib.aws_lambda.DockerImageFunction"
5024
+ "fqn": "cdk-nextjs.OptionalNextjsBuildProps"
4517
5025
  }
4518
- }
4519
- ],
4520
- "symbolId": "src/nextjs-assets-deployment:NextjsAssetsDeployment"
4521
- },
4522
- "cdk-nextjs.NextjsAssetsDeploymentProps": {
4523
- "assembly": "cdk-nextjs",
4524
- "datatype": true,
4525
- "docs": {
4526
- "stability": "stable"
4527
- },
4528
- "fqn": "cdk-nextjs.NextjsAssetsDeploymentProps",
4529
- "kind": "interface",
4530
- "locationInModule": {
4531
- "filename": "src/nextjs-assets-deployment.ts",
4532
- "line": 37
4533
- },
4534
- "name": "NextjsAssetsDeploymentProps",
4535
- "properties": [
5026
+ },
4536
5027
  {
4537
5028
  "abstract": true,
4538
5029
  "docs": {
@@ -4540,12 +5031,13 @@
4540
5031
  },
4541
5032
  "immutable": true,
4542
5033
  "locationInModule": {
4543
- "filename": "src/nextjs-assets-deployment.ts",
5034
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
4544
5035
  "line": 38
4545
5036
  },
4546
- "name": "accessPoint",
5037
+ "name": "nextjsFileSystemProps",
5038
+ "optional": true,
4547
5039
  "type": {
4548
- "fqn": "aws-cdk-lib.aws_efs.AccessPoint"
5040
+ "fqn": "cdk-nextjs.OptionalNextjsFileSystemProps"
4549
5041
  }
4550
5042
  },
4551
5043
  {
@@ -4555,28 +5047,29 @@
4555
5047
  },
4556
5048
  "immutable": true,
4557
5049
  "locationInModule": {
4558
- "filename": "src/nextjs-assets-deployment.ts",
4559
- "line": 44
5050
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5051
+ "line": 40
4560
5052
  },
4561
- "name": "buildId",
5053
+ "name": "nextjsPostDeployProps",
5054
+ "optional": true,
4562
5055
  "type": {
4563
- "primitive": "string"
5056
+ "fqn": "cdk-nextjs.OptionalNextjsPostDeployProps"
4564
5057
  }
4565
5058
  },
4566
5059
  {
4567
5060
  "abstract": true,
4568
5061
  "docs": {
4569
- "see": "{@link NextjsBuild.buildImageDigest }",
4570
5062
  "stability": "stable"
4571
5063
  },
4572
5064
  "immutable": true,
4573
5065
  "locationInModule": {
4574
- "filename": "src/nextjs-assets-deployment.ts",
4575
- "line": 48
5066
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5067
+ "line": 41
4576
5068
  },
4577
- "name": "buildImageDigest",
5069
+ "name": "nextjsStaticAssetsProps",
5070
+ "optional": true,
4578
5071
  "type": {
4579
- "primitive": "string"
5072
+ "fqn": "cdk-nextjs.NextjsStaticAssetsProps"
4580
5073
  }
4581
5074
  },
4582
5075
  {
@@ -4586,14 +5079,36 @@
4586
5079
  },
4587
5080
  "immutable": true,
4588
5081
  "locationInModule": {
4589
- "filename": "src/nextjs-assets-deployment.ts",
4590
- "line": 54
5082
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5083
+ "line": 37
4591
5084
  },
4592
- "name": "dockerImageCode",
5085
+ "name": "nextjsVpcProps",
5086
+ "optional": true,
4593
5087
  "type": {
4594
- "fqn": "aws-cdk-lib.aws_lambda.DockerImageCode"
5088
+ "fqn": "cdk-nextjs.OptionalNextjsVpcProps"
4595
5089
  }
4596
- },
5090
+ }
5091
+ ],
5092
+ "symbolId": "src/root-constructs/nextjs-base-construct:NextjsBaseConstructOverrides"
5093
+ },
5094
+ "cdk-nextjs.NextjsBaseConstructProps": {
5095
+ "assembly": "cdk-nextjs",
5096
+ "datatype": true,
5097
+ "docs": {
5098
+ "stability": "stable",
5099
+ "summary": "Required because if we add `overrides` onto `NextjsBaseProps` we get jsii error: `Interface ... re-declares member \"overrides\"`."
5100
+ },
5101
+ "fqn": "cdk-nextjs.NextjsBaseConstructProps",
5102
+ "interfaces": [
5103
+ "cdk-nextjs.NextjsBaseProps"
5104
+ ],
5105
+ "kind": "interface",
5106
+ "locationInModule": {
5107
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5108
+ "line": 130
5109
+ },
5110
+ "name": "NextjsBaseConstructProps",
5111
+ "properties": [
4597
5112
  {
4598
5113
  "abstract": true,
4599
5114
  "docs": {
@@ -4601,14 +5116,33 @@
4601
5116
  },
4602
5117
  "immutable": true,
4603
5118
  "locationInModule": {
4604
- "filename": "src/nextjs-assets-deployment.ts",
4605
- "line": 55
5119
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5120
+ "line": 131
4606
5121
  },
4607
- "name": "nextjsType",
5122
+ "name": "overrides",
5123
+ "optional": true,
4608
5124
  "type": {
4609
- "fqn": "cdk-nextjs.NextjsType"
5125
+ "fqn": "cdk-nextjs.NextjsBaseOverrides"
4610
5126
  }
4611
- },
5127
+ }
5128
+ ],
5129
+ "symbolId": "src/root-constructs/nextjs-base-construct:NextjsBaseConstructProps"
5130
+ },
5131
+ "cdk-nextjs.NextjsBaseOverrides": {
5132
+ "assembly": "cdk-nextjs",
5133
+ "datatype": true,
5134
+ "docs": {
5135
+ "stability": "stable",
5136
+ "summary": "Base overrides for constructs shared between all root/top-level Next.js constructs."
5137
+ },
5138
+ "fqn": "cdk-nextjs.NextjsBaseOverrides",
5139
+ "kind": "interface",
5140
+ "locationInModule": {
5141
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5142
+ "line": 47
5143
+ },
5144
+ "name": "NextjsBaseOverrides",
5145
+ "properties": [
4612
5146
  {
4613
5147
  "abstract": true,
4614
5148
  "docs": {
@@ -4616,48 +5150,45 @@
4616
5150
  },
4617
5151
  "immutable": true,
4618
5152
  "locationInModule": {
4619
- "filename": "src/nextjs-assets-deployment.ts",
4620
- "line": 65
5153
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5154
+ "line": 51
4621
5155
  },
4622
- "name": "vpc",
5156
+ "name": "nextjsAssetsDeployment",
5157
+ "optional": true,
4623
5158
  "type": {
4624
- "fqn": "aws-cdk-lib.aws_ec2.IVpc"
5159
+ "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides"
4625
5160
  }
4626
5161
  },
4627
5162
  {
4628
5163
  "abstract": true,
4629
5164
  "docs": {
4630
- "example": "\"/my-base-path\"",
4631
- "stability": "stable",
4632
- "summary": "Prefix to the URI path the app will be served at."
5165
+ "stability": "stable"
4633
5166
  },
4634
5167
  "immutable": true,
4635
5168
  "locationInModule": {
4636
- "filename": "src/nextjs-assets-deployment.ts",
4637
- "line": 43
5169
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5170
+ "line": 48
4638
5171
  },
4639
- "name": "basePath",
5172
+ "name": "nextjsBuild",
4640
5173
  "optional": true,
4641
5174
  "type": {
4642
- "primitive": "string"
5175
+ "fqn": "cdk-nextjs.NextjsBuildOverrides"
4643
5176
  }
4644
5177
  },
4645
5178
  {
4646
5179
  "abstract": true,
4647
5180
  "docs": {
4648
- "default": "true",
4649
- "stability": "stable",
4650
- "summary": "If true, logs details in custom resource lambda."
5181
+ "stability": "stable"
4651
5182
  },
4652
5183
  "immutable": true,
4653
5184
  "locationInModule": {
4654
- "filename": "src/nextjs-assets-deployment.ts",
4655
- "line": 53
5185
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5186
+ "line": 49
4656
5187
  },
4657
- "name": "debug",
5188
+ "name": "nextjsFileSystem",
4658
5189
  "optional": true,
4659
5190
  "type": {
4660
- "primitive": "boolean"
5191
+ "fqn": "cdk-nextjs.NextjsFileSystemOverrides"
4661
5192
  }
4662
5193
  },
4663
5194
  {
@@ -4667,51 +5198,49 @@
4667
5198
  },
4668
5199
  "immutable": true,
4669
5200
  "locationInModule": {
4670
- "filename": "src/nextjs-assets-deployment.ts",
4671
- "line": 56
5201
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5202
+ "line": 52
4672
5203
  },
4673
- "name": "overrides",
5204
+ "name": "nextjsPostDeploy",
4674
5205
  "optional": true,
4675
5206
  "type": {
4676
- "fqn": "cdk-nextjs.NextjsAssetDeploymentOverrides"
5207
+ "fqn": "cdk-nextjs.NextjsPostDeployOverrides"
4677
5208
  }
4678
5209
  },
4679
5210
  {
4680
5211
  "abstract": true,
4681
5212
  "docs": {
4682
- "see": "{@link NextjsBaseProps.relativePathToPackage }",
4683
5213
  "stability": "stable"
4684
5214
  },
4685
5215
  "immutable": true,
4686
5216
  "locationInModule": {
4687
- "filename": "src/nextjs-assets-deployment.ts",
4688
- "line": 60
5217
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5218
+ "line": 53
4689
5219
  },
4690
- "name": "relativePathToPackage",
5220
+ "name": "nextjsStaticAssets",
4691
5221
  "optional": true,
4692
5222
  "type": {
4693
- "primitive": "string"
5223
+ "fqn": "cdk-nextjs.NextjsStaticAssetsOverrides"
4694
5224
  }
4695
5225
  },
4696
5226
  {
4697
5227
  "abstract": true,
4698
5228
  "docs": {
4699
- "stability": "stable",
4700
- "summary": "Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`."
5229
+ "stability": "stable"
4701
5230
  },
4702
5231
  "immutable": true,
4703
5232
  "locationInModule": {
4704
- "filename": "src/nextjs-assets-deployment.ts",
4705
- "line": 64
5233
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5234
+ "line": 50
4706
5235
  },
4707
- "name": "staticAssetsBucket",
5236
+ "name": "nextjsVpc",
4708
5237
  "optional": true,
4709
5238
  "type": {
4710
- "fqn": "aws-cdk-lib.aws_s3.Bucket"
5239
+ "fqn": "cdk-nextjs.NextjsVpcOverrides"
4711
5240
  }
4712
5241
  }
4713
5242
  ],
4714
- "symbolId": "src/nextjs-assets-deployment:NextjsAssetsDeploymentProps"
5243
+ "symbolId": "src/root-constructs/nextjs-base-construct:NextjsBaseOverrides"
4715
5244
  },
4716
5245
  "cdk-nextjs.NextjsBaseProps": {
4717
5246
  "assembly": "cdk-nextjs",
@@ -4722,8 +5251,8 @@
4722
5251
  "fqn": "cdk-nextjs.NextjsBaseProps",
4723
5252
  "kind": "interface",
4724
5253
  "locationInModule": {
4725
- "filename": "src/root-constructs/nextjs-base-props.ts",
4726
- "line": 1
5254
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5255
+ "line": 56
4727
5256
  },
4728
5257
  "name": "NextjsBaseProps",
4729
5258
  "properties": [
@@ -4737,8 +5266,8 @@
4737
5266
  },
4738
5267
  "immutable": true,
4739
5268
  "locationInModule": {
4740
- "filename": "src/root-constructs/nextjs-base-props.ts",
4741
- "line": 22
5269
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5270
+ "line": 82
4742
5271
  },
4743
5272
  "name": "buildContext",
4744
5273
  "type": {
@@ -4754,14 +5283,32 @@
4754
5283
  },
4755
5284
  "immutable": true,
4756
5285
  "locationInModule": {
4757
- "filename": "src/root-constructs/nextjs-base-props.ts",
4758
- "line": 34
5286
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5287
+ "line": 94
4759
5288
  },
4760
5289
  "name": "healthCheckPath",
4761
5290
  "type": {
4762
5291
  "primitive": "string"
4763
5292
  }
4764
5293
  },
5294
+ {
5295
+ "abstract": true,
5296
+ "docs": {
5297
+ "example": "\"/my-base-path\"",
5298
+ "stability": "stable",
5299
+ "summary": "Prefix to the URI path the app will be served at."
5300
+ },
5301
+ "immutable": true,
5302
+ "locationInModule": {
5303
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5304
+ "line": 61
5305
+ },
5306
+ "name": "basePath",
5307
+ "optional": true,
5308
+ "type": {
5309
+ "primitive": "string"
5310
+ }
5311
+ },
4765
5312
  {
4766
5313
  "abstract": true,
4767
5314
  "docs": {
@@ -4771,8 +5318,8 @@
4771
5318
  },
4772
5319
  "immutable": true,
4773
5320
  "locationInModule": {
4774
- "filename": "src/root-constructs/nextjs-base-props.ts",
4775
- "line": 6
5321
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5322
+ "line": 66
4776
5323
  },
4777
5324
  "name": "buildCommand",
4778
5325
  "optional": true,
@@ -4790,8 +5337,8 @@
4790
5337
  },
4791
5338
  "immutable": true,
4792
5339
  "locationInModule": {
4793
- "filename": "src/root-constructs/nextjs-base-props.ts",
4794
- "line": 59
5340
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5341
+ "line": 119
4795
5342
  },
4796
5343
  "name": "relativePathToPackage",
4797
5344
  "optional": true,
@@ -4807,8 +5354,8 @@
4807
5354
  },
4808
5355
  "immutable": true,
4809
5356
  "locationInModule": {
4810
- "filename": "src/root-constructs/nextjs-base-props.ts",
4811
- "line": 63
5357
+ "filename": "src/root-constructs/nextjs-base-construct.ts",
5358
+ "line": 123
4812
5359
  },
4813
5360
  "name": "relativePathToWorkspace",
4814
5361
  "optional": true,
@@ -4817,7 +5364,7 @@
4817
5364
  }
4818
5365
  }
4819
5366
  ],
4820
- "symbolId": "src/root-constructs/nextjs-base-props:NextjsBaseProps"
5367
+ "symbolId": "src/root-constructs/nextjs-base-construct:NextjsBaseProps"
4821
5368
  },
4822
5369
  "cdk-nextjs.NextjsBuild": {
4823
5370
  "assembly": "cdk-nextjs",
@@ -5867,7 +6414,7 @@
5867
6414
  "abstract": true,
5868
6415
  "docs": {
5869
6416
  "stability": "stable",
5870
- "summary": "Path to directory of Next.js app's public directory. Used to add static behaviors to distribution."
6417
+ "summary": "Entries (files/directories) within Next.js app's public directory. Used to add static behaviors to distribution."
5871
6418
  },
5872
6419
  "immutable": true,
5873
6420
  "locationInModule": {
@@ -6191,7 +6738,7 @@
6191
6738
  },
6192
6739
  "locationInModule": {
6193
6740
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6194
- "line": 42
6741
+ "line": 44
6195
6742
  },
6196
6743
  "parameters": [
6197
6744
  {
@@ -6217,7 +6764,7 @@
6217
6764
  "kind": "class",
6218
6765
  "locationInModule": {
6219
6766
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6220
- "line": 36
6767
+ "line": 38
6221
6768
  },
6222
6769
  "name": "NextjsFunctions",
6223
6770
  "properties": [
@@ -6227,7 +6774,7 @@
6227
6774
  },
6228
6775
  "locationInModule": {
6229
6776
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6230
- "line": 37
6777
+ "line": 39
6231
6778
  },
6232
6779
  "name": "function",
6233
6780
  "type": {
@@ -6240,9 +6787,10 @@
6240
6787
  },
6241
6788
  "locationInModule": {
6242
6789
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6243
- "line": 38
6790
+ "line": 40
6244
6791
  },
6245
6792
  "name": "functionUrl",
6793
+ "optional": true,
6246
6794
  "type": {
6247
6795
  "fqn": "aws-cdk-lib.aws_lambda.FunctionUrl"
6248
6796
  }
@@ -6260,7 +6808,7 @@
6260
6808
  "kind": "interface",
6261
6809
  "locationInModule": {
6262
6810
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6263
- "line": 22
6811
+ "line": 23
6264
6812
  },
6265
6813
  "name": "NextjsFunctionsOverrides",
6266
6814
  "properties": [
@@ -6272,7 +6820,7 @@
6272
6820
  "immutable": true,
6273
6821
  "locationInModule": {
6274
6822
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6275
- "line": 23
6823
+ "line": 24
6276
6824
  },
6277
6825
  "name": "dockerImageFunctionProps",
6278
6826
  "optional": true,
@@ -6288,7 +6836,7 @@
6288
6836
  "immutable": true,
6289
6837
  "locationInModule": {
6290
6838
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6291
- "line": 24
6839
+ "line": 25
6292
6840
  },
6293
6841
  "name": "functionUrlProps",
6294
6842
  "optional": true,
@@ -6312,7 +6860,7 @@
6312
6860
  "kind": "interface",
6313
6861
  "locationInModule": {
6314
6862
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6315
- "line": 27
6863
+ "line": 28
6316
6864
  },
6317
6865
  "name": "NextjsFunctionsProps",
6318
6866
  "properties": [
@@ -6324,7 +6872,7 @@
6324
6872
  "immutable": true,
6325
6873
  "locationInModule": {
6326
6874
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6327
- "line": 30
6875
+ "line": 31
6328
6876
  },
6329
6877
  "name": "buildId",
6330
6878
  "type": {
@@ -6339,7 +6887,7 @@
6339
6887
  "immutable": true,
6340
6888
  "locationInModule": {
6341
6889
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6342
- "line": 28
6890
+ "line": 29
6343
6891
  },
6344
6892
  "name": "dockerImageCode",
6345
6893
  "type": {
@@ -6354,7 +6902,22 @@
6354
6902
  "immutable": true,
6355
6903
  "locationInModule": {
6356
6904
  "filename": "src/nextjs-compute/nextjs-functions.ts",
6357
- "line": 29
6905
+ "line": 32
6906
+ },
6907
+ "name": "nextjsType",
6908
+ "type": {
6909
+ "fqn": "cdk-nextjs.NextjsType"
6910
+ }
6911
+ },
6912
+ {
6913
+ "abstract": true,
6914
+ "docs": {
6915
+ "stability": "stable"
6916
+ },
6917
+ "immutable": true,
6918
+ "locationInModule": {
6919
+ "filename": "src/nextjs-compute/nextjs-functions.ts",
6920
+ "line": 30
6358
6921
  },
6359
6922
  "name": "overrides",
6360
6923
  "optional": true,
@@ -6367,7 +6930,7 @@
6367
6930
  },
6368
6931
  "cdk-nextjs.NextjsGlobalContainers": {
6369
6932
  "assembly": "cdk-nextjs",
6370
- "base": "constructs.Construct",
6933
+ "base": "cdk-nextjs.NextjsBaseConstruct",
6371
6934
  "docs": {
6372
6935
  "stability": "stable",
6373
6936
  "summary": "Deploy Next.js globally distributed with containers. Uses [CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) as Content Delivery Network (CDN) for global distribution and [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) for containers."
@@ -6379,7 +6942,7 @@
6379
6942
  },
6380
6943
  "locationInModule": {
6381
6944
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6382
- "line": 87
6945
+ "line": 65
6383
6946
  },
6384
6947
  "parameters": [
6385
6948
  {
@@ -6405,7 +6968,7 @@
6405
6968
  "kind": "class",
6406
6969
  "locationInModule": {
6407
6970
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6408
- "line": 74
6971
+ "line": 56
6409
6972
  },
6410
6973
  "name": "NextjsGlobalContainers",
6411
6974
  "properties": [
@@ -6413,26 +6976,15 @@
6413
6976
  "docs": {
6414
6977
  "stability": "stable"
6415
6978
  },
6979
+ "immutable": true,
6416
6980
  "locationInModule": {
6417
6981
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6418
- "line": 79
6419
- },
6420
- "name": "nextjsAssetsDeployment",
6421
- "type": {
6422
- "fqn": "cdk-nextjs.NextjsAssetsDeployment"
6423
- }
6424
- },
6425
- {
6426
- "docs": {
6427
- "stability": "stable"
6428
- },
6429
- "locationInModule": {
6430
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6431
- "line": 75
6982
+ "line": 59
6432
6983
  },
6433
- "name": "nextjsBuild",
6984
+ "name": "url",
6985
+ "overrides": "cdk-nextjs.NextjsBaseConstruct",
6434
6986
  "type": {
6435
- "fqn": "cdk-nextjs.NextjsBuild"
6987
+ "primitive": "string"
6436
6988
  }
6437
6989
  },
6438
6990
  {
@@ -6441,7 +6993,7 @@
6441
6993
  },
6442
6994
  "locationInModule": {
6443
6995
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6444
- "line": 80
6996
+ "line": 57
6445
6997
  },
6446
6998
  "name": "nextjsContainers",
6447
6999
  "type": {
@@ -6454,64 +7006,12 @@
6454
7006
  },
6455
7007
  "locationInModule": {
6456
7008
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6457
- "line": 81
7009
+ "line": 58
6458
7010
  },
6459
7011
  "name": "nextjsDistribution",
6460
7012
  "type": {
6461
7013
  "fqn": "cdk-nextjs.NextjsDistribution"
6462
7014
  }
6463
- },
6464
- {
6465
- "docs": {
6466
- "stability": "stable"
6467
- },
6468
- "locationInModule": {
6469
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6470
- "line": 78
6471
- },
6472
- "name": "nextjsFileSystem",
6473
- "type": {
6474
- "fqn": "cdk-nextjs.NextjsFileSystem"
6475
- }
6476
- },
6477
- {
6478
- "docs": {
6479
- "stability": "stable"
6480
- },
6481
- "locationInModule": {
6482
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6483
- "line": 82
6484
- },
6485
- "name": "nextjsPostDeploy",
6486
- "type": {
6487
- "fqn": "cdk-nextjs.NextjsPostDeploy"
6488
- }
6489
- },
6490
- {
6491
- "docs": {
6492
- "stability": "stable"
6493
- },
6494
- "locationInModule": {
6495
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6496
- "line": 76
6497
- },
6498
- "name": "nextjsStaticAssets",
6499
- "type": {
6500
- "fqn": "cdk-nextjs.NextjsStaticAssets"
6501
- }
6502
- },
6503
- {
6504
- "docs": {
6505
- "stability": "stable"
6506
- },
6507
- "locationInModule": {
6508
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6509
- "line": 77
6510
- },
6511
- "name": "nextjsVpc",
6512
- "type": {
6513
- "fqn": "cdk-nextjs.NextjsVpc"
6514
- }
6515
7015
  }
6516
7016
  ],
6517
7017
  "symbolId": "src/root-constructs/nextjs-global-containers:NextjsGlobalContainers"
@@ -6524,12 +7024,12 @@
6524
7024
  },
6525
7025
  "fqn": "cdk-nextjs.NextjsGlobalContainersConstructOverrides",
6526
7026
  "interfaces": [
6527
- "cdk-nextjs.BaseNextjsConstructOverrides"
7027
+ "cdk-nextjs.NextjsBaseConstructOverrides"
6528
7028
  ],
6529
7029
  "kind": "interface",
6530
7030
  "locationInModule": {
6531
7031
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6532
- "line": 31
7032
+ "line": 21
6533
7033
  },
6534
7034
  "name": "NextjsGlobalContainersConstructOverrides",
6535
7035
  "properties": [
@@ -6541,7 +7041,7 @@
6541
7041
  "immutable": true,
6542
7042
  "locationInModule": {
6543
7043
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6544
- "line": 33
7044
+ "line": 23
6545
7045
  },
6546
7046
  "name": "nextjsContainersProps",
6547
7047
  "optional": true,
@@ -6557,29 +7057,13 @@
6557
7057
  "immutable": true,
6558
7058
  "locationInModule": {
6559
7059
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6560
- "line": 34
7060
+ "line": 24
6561
7061
  },
6562
7062
  "name": "nextjsDistributionProps",
6563
7063
  "optional": true,
6564
7064
  "type": {
6565
7065
  "fqn": "cdk-nextjs.OptionalNextjsDistributionProps"
6566
7066
  }
6567
- },
6568
- {
6569
- "abstract": true,
6570
- "docs": {
6571
- "stability": "stable"
6572
- },
6573
- "immutable": true,
6574
- "locationInModule": {
6575
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6576
- "line": 35
6577
- },
6578
- "name": "nextjsStaticAssetsProps",
6579
- "optional": true,
6580
- "type": {
6581
- "fqn": "cdk-nextjs.NextjsStaticAssetsProps"
6582
- }
6583
7067
  }
6584
7068
  ],
6585
7069
  "symbolId": "src/root-constructs/nextjs-global-containers:NextjsGlobalContainersConstructOverrides"
@@ -6594,12 +7078,12 @@
6594
7078
  },
6595
7079
  "fqn": "cdk-nextjs.NextjsGlobalContainersOverrides",
6596
7080
  "interfaces": [
6597
- "cdk-nextjs.BaseNextjsOverrides"
7081
+ "cdk-nextjs.NextjsBaseOverrides"
6598
7082
  ],
6599
7083
  "kind": "interface",
6600
7084
  "locationInModule": {
6601
7085
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6602
- "line": 43
7086
+ "line": 32
6603
7087
  },
6604
7088
  "name": "NextjsGlobalContainersOverrides",
6605
7089
  "properties": [
@@ -6611,7 +7095,7 @@
6611
7095
  "immutable": true,
6612
7096
  "locationInModule": {
6613
7097
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6614
- "line": 45
7098
+ "line": 34
6615
7099
  },
6616
7100
  "name": "nextjsContainers",
6617
7101
  "optional": true,
@@ -6627,7 +7111,7 @@
6627
7111
  "immutable": true,
6628
7112
  "locationInModule": {
6629
7113
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6630
- "line": 46
7114
+ "line": 35
6631
7115
  },
6632
7116
  "name": "nextjsDistribution",
6633
7117
  "optional": true,
@@ -6643,29 +7127,13 @@
6643
7127
  "immutable": true,
6644
7128
  "locationInModule": {
6645
7129
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6646
- "line": 44
7130
+ "line": 33
6647
7131
  },
6648
7132
  "name": "nextjsGlobalContainers",
6649
7133
  "optional": true,
6650
7134
  "type": {
6651
7135
  "fqn": "cdk-nextjs.NextjsGlobalContainersConstructOverrides"
6652
7136
  }
6653
- },
6654
- {
6655
- "abstract": true,
6656
- "docs": {
6657
- "stability": "stable"
6658
- },
6659
- "immutable": true,
6660
- "locationInModule": {
6661
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6662
- "line": 47
6663
- },
6664
- "name": "nextjsStaticAssets",
6665
- "optional": true,
6666
- "type": {
6667
- "fqn": "cdk-nextjs.NextjsStaticAssetsOverrides"
6668
- }
6669
7137
  }
6670
7138
  ],
6671
7139
  "symbolId": "src/root-constructs/nextjs-global-containers:NextjsGlobalContainersOverrides"
@@ -6683,29 +7151,10 @@
6683
7151
  "kind": "interface",
6684
7152
  "locationInModule": {
6685
7153
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6686
- "line": 50
7154
+ "line": 38
6687
7155
  },
6688
7156
  "name": "NextjsGlobalContainersProps",
6689
7157
  "properties": [
6690
- {
6691
- "abstract": true,
6692
- "docs": {
6693
- "example": "\"/my-base-path\"",
6694
- "remarks": "Especially useful when\npassing in your own `distribution`.",
6695
- "stability": "stable",
6696
- "summary": "Prefix to the URI path the app will be served at."
6697
- },
6698
- "immutable": true,
6699
- "locationInModule": {
6700
- "filename": "src/root-constructs/nextjs-global-containers.ts",
6701
- "line": 56
6702
- },
6703
- "name": "basePath",
6704
- "optional": true,
6705
- "type": {
6706
- "primitive": "string"
6707
- }
6708
- },
6709
7158
  {
6710
7159
  "abstract": true,
6711
7160
  "docs": {
@@ -6716,7 +7165,7 @@
6716
7165
  "immutable": true,
6717
7166
  "locationInModule": {
6718
7167
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6719
- "line": 61
7168
+ "line": 43
6720
7169
  },
6721
7170
  "name": "distribution",
6722
7171
  "optional": true,
@@ -6733,7 +7182,7 @@
6733
7182
  "immutable": true,
6734
7183
  "locationInModule": {
6735
7184
  "filename": "src/root-constructs/nextjs-global-containers.ts",
6736
- "line": 65
7185
+ "line": 47
6737
7186
  },
6738
7187
  "name": "overrides",
6739
7188
  "optional": true,
@@ -6746,7 +7195,7 @@
6746
7195
  },
6747
7196
  "cdk-nextjs.NextjsGlobalFunctions": {
6748
7197
  "assembly": "cdk-nextjs",
6749
- "base": "constructs.Construct",
7198
+ "base": "cdk-nextjs.NextjsBaseConstruct",
6750
7199
  "docs": {
6751
7200
  "stability": "stable",
6752
7201
  "summary": "Deploy Next.js globally distributed with functions. Uses [CloudFront Distribution](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/distribution-working-with.html) as Content Delivery Network (CDN) for global distribution and [AWS Lambda Functions](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) for functions."
@@ -6758,7 +7207,7 @@
6758
7207
  },
6759
7208
  "locationInModule": {
6760
7209
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6761
- "line": 87
7210
+ "line": 65
6762
7211
  },
6763
7212
  "parameters": [
6764
7213
  {
@@ -6767,103 +7216,40 @@
6767
7216
  "fqn": "constructs.Construct"
6768
7217
  }
6769
7218
  },
6770
- {
6771
- "name": "id",
6772
- "type": {
6773
- "primitive": "string"
6774
- }
6775
- },
6776
- {
6777
- "name": "props",
6778
- "type": {
6779
- "fqn": "cdk-nextjs.NextjsGlobalFunctionsProps"
6780
- }
6781
- }
6782
- ]
6783
- },
6784
- "kind": "class",
6785
- "locationInModule": {
6786
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6787
- "line": 74
6788
- },
6789
- "name": "NextjsGlobalFunctions",
6790
- "properties": [
6791
- {
6792
- "docs": {
6793
- "stability": "stable"
6794
- },
6795
- "locationInModule": {
6796
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6797
- "line": 79
6798
- },
6799
- "name": "nextjsAssetsDeployment",
6800
- "type": {
6801
- "fqn": "cdk-nextjs.NextjsAssetsDeployment"
6802
- }
6803
- },
6804
- {
6805
- "docs": {
6806
- "stability": "stable"
6807
- },
6808
- "locationInModule": {
6809
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6810
- "line": 75
6811
- },
6812
- "name": "nextjsBuild",
6813
- "type": {
6814
- "fqn": "cdk-nextjs.NextjsBuild"
6815
- }
6816
- },
6817
- {
6818
- "docs": {
6819
- "stability": "stable"
6820
- },
6821
- "locationInModule": {
6822
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6823
- "line": 81
6824
- },
6825
- "name": "nextjsDistribution",
6826
- "type": {
6827
- "fqn": "cdk-nextjs.NextjsDistribution"
6828
- }
6829
- },
6830
- {
6831
- "docs": {
6832
- "stability": "stable"
6833
- },
6834
- "locationInModule": {
6835
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6836
- "line": 78
6837
- },
6838
- "name": "nextjsFileSystem",
6839
- "type": {
6840
- "fqn": "cdk-nextjs.NextjsFileSystem"
6841
- }
6842
- },
6843
- {
6844
- "docs": {
6845
- "stability": "stable"
6846
- },
6847
- "locationInModule": {
6848
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6849
- "line": 80
6850
- },
6851
- "name": "nextjsFunctions",
6852
- "type": {
6853
- "fqn": "cdk-nextjs.NextjsFunctions"
7219
+ {
7220
+ "name": "id",
7221
+ "type": {
7222
+ "primitive": "string"
7223
+ }
7224
+ },
7225
+ {
7226
+ "name": "props",
7227
+ "type": {
7228
+ "fqn": "cdk-nextjs.NextjsGlobalFunctionsProps"
7229
+ }
6854
7230
  }
6855
- },
7231
+ ]
7232
+ },
7233
+ "kind": "class",
7234
+ "locationInModule": {
7235
+ "filename": "src/root-constructs/nextjs-global-functions.ts",
7236
+ "line": 56
7237
+ },
7238
+ "name": "NextjsGlobalFunctions",
7239
+ "properties": [
6856
7240
  {
6857
7241
  "docs": {
6858
7242
  "stability": "stable"
6859
7243
  },
7244
+ "immutable": true,
6860
7245
  "locationInModule": {
6861
7246
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6862
- "line": 82
7247
+ "line": 59
6863
7248
  },
6864
- "name": "nextjsPostDeploy",
7249
+ "name": "url",
7250
+ "overrides": "cdk-nextjs.NextjsBaseConstruct",
6865
7251
  "type": {
6866
- "fqn": "cdk-nextjs.NextjsPostDeploy"
7252
+ "primitive": "string"
6867
7253
  }
6868
7254
  },
6869
7255
  {
@@ -6872,11 +7258,11 @@
6872
7258
  },
6873
7259
  "locationInModule": {
6874
7260
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6875
- "line": 76
7261
+ "line": 58
6876
7262
  },
6877
- "name": "nextjsStaticAssets",
7263
+ "name": "nextjsDistribution",
6878
7264
  "type": {
6879
- "fqn": "cdk-nextjs.NextjsStaticAssets"
7265
+ "fqn": "cdk-nextjs.NextjsDistribution"
6880
7266
  }
6881
7267
  },
6882
7268
  {
@@ -6885,11 +7271,11 @@
6885
7271
  },
6886
7272
  "locationInModule": {
6887
7273
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6888
- "line": 77
7274
+ "line": 57
6889
7275
  },
6890
- "name": "nextjsVpc",
7276
+ "name": "nextjsFunctions",
6891
7277
  "type": {
6892
- "fqn": "cdk-nextjs.NextjsVpc"
7278
+ "fqn": "cdk-nextjs.NextjsFunctions"
6893
7279
  }
6894
7280
  }
6895
7281
  ],
@@ -6903,12 +7289,12 @@
6903
7289
  },
6904
7290
  "fqn": "cdk-nextjs.NextjsGlobalFunctionsConstructOverrides",
6905
7291
  "interfaces": [
6906
- "cdk-nextjs.BaseNextjsConstructOverrides"
7292
+ "cdk-nextjs.NextjsBaseConstructOverrides"
6907
7293
  ],
6908
7294
  "kind": "interface",
6909
7295
  "locationInModule": {
6910
7296
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6911
- "line": 31
7297
+ "line": 21
6912
7298
  },
6913
7299
  "name": "NextjsGlobalFunctionsConstructOverrides",
6914
7300
  "properties": [
@@ -6920,7 +7306,7 @@
6920
7306
  "immutable": true,
6921
7307
  "locationInModule": {
6922
7308
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6923
- "line": 34
7309
+ "line": 24
6924
7310
  },
6925
7311
  "name": "nextjsDistributionProps",
6926
7312
  "optional": true,
@@ -6936,29 +7322,13 @@
6936
7322
  "immutable": true,
6937
7323
  "locationInModule": {
6938
7324
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6939
- "line": 33
7325
+ "line": 23
6940
7326
  },
6941
7327
  "name": "nextjsFunctionsProps",
6942
7328
  "optional": true,
6943
7329
  "type": {
6944
7330
  "fqn": "cdk-nextjs.NextjsFunctionsProps"
6945
7331
  }
6946
- },
6947
- {
6948
- "abstract": true,
6949
- "docs": {
6950
- "stability": "stable"
6951
- },
6952
- "immutable": true,
6953
- "locationInModule": {
6954
- "filename": "src/root-constructs/nextjs-global-functions.ts",
6955
- "line": 35
6956
- },
6957
- "name": "nextjsStaticAssetsProps",
6958
- "optional": true,
6959
- "type": {
6960
- "fqn": "cdk-nextjs.NextjsStaticAssetsProps"
6961
- }
6962
7332
  }
6963
7333
  ],
6964
7334
  "symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsConstructOverrides"
@@ -6973,12 +7343,12 @@
6973
7343
  },
6974
7344
  "fqn": "cdk-nextjs.NextjsGlobalFunctionsOverrides",
6975
7345
  "interfaces": [
6976
- "cdk-nextjs.BaseNextjsOverrides"
7346
+ "cdk-nextjs.NextjsBaseOverrides"
6977
7347
  ],
6978
7348
  "kind": "interface",
6979
7349
  "locationInModule": {
6980
7350
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6981
- "line": 43
7351
+ "line": 32
6982
7352
  },
6983
7353
  "name": "NextjsGlobalFunctionsOverrides",
6984
7354
  "properties": [
@@ -6990,7 +7360,7 @@
6990
7360
  "immutable": true,
6991
7361
  "locationInModule": {
6992
7362
  "filename": "src/root-constructs/nextjs-global-functions.ts",
6993
- "line": 46
7363
+ "line": 35
6994
7364
  },
6995
7365
  "name": "nextjsDistribution",
6996
7366
  "optional": true,
@@ -7006,7 +7376,7 @@
7006
7376
  "immutable": true,
7007
7377
  "locationInModule": {
7008
7378
  "filename": "src/root-constructs/nextjs-global-functions.ts",
7009
- "line": 45
7379
+ "line": 34
7010
7380
  },
7011
7381
  "name": "nextjsFunctions",
7012
7382
  "optional": true,
@@ -7022,29 +7392,13 @@
7022
7392
  "immutable": true,
7023
7393
  "locationInModule": {
7024
7394
  "filename": "src/root-constructs/nextjs-global-functions.ts",
7025
- "line": 44
7395
+ "line": 33
7026
7396
  },
7027
7397
  "name": "nextjsGlobalFunctions",
7028
7398
  "optional": true,
7029
7399
  "type": {
7030
7400
  "fqn": "cdk-nextjs.NextjsGlobalFunctionsConstructOverrides"
7031
7401
  }
7032
- },
7033
- {
7034
- "abstract": true,
7035
- "docs": {
7036
- "stability": "stable"
7037
- },
7038
- "immutable": true,
7039
- "locationInModule": {
7040
- "filename": "src/root-constructs/nextjs-global-functions.ts",
7041
- "line": 47
7042
- },
7043
- "name": "nextjsStaticAssets",
7044
- "optional": true,
7045
- "type": {
7046
- "fqn": "cdk-nextjs.NextjsStaticAssetsOverrides"
7047
- }
7048
7402
  }
7049
7403
  ],
7050
7404
  "symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsOverrides"
@@ -7062,29 +7416,10 @@
7062
7416
  "kind": "interface",
7063
7417
  "locationInModule": {
7064
7418
  "filename": "src/root-constructs/nextjs-global-functions.ts",
7065
- "line": 50
7419
+ "line": 38
7066
7420
  },
7067
7421
  "name": "NextjsGlobalFunctionsProps",
7068
7422
  "properties": [
7069
- {
7070
- "abstract": true,
7071
- "docs": {
7072
- "example": "\"/my-base-path\"",
7073
- "remarks": "Especially useful when\npassing in your own `distribution`.",
7074
- "stability": "stable",
7075
- "summary": "Prefix to the URI path the app will be served at."
7076
- },
7077
- "immutable": true,
7078
- "locationInModule": {
7079
- "filename": "src/root-constructs/nextjs-global-functions.ts",
7080
- "line": 56
7081
- },
7082
- "name": "basePath",
7083
- "optional": true,
7084
- "type": {
7085
- "primitive": "string"
7086
- }
7087
- },
7088
7423
  {
7089
7424
  "abstract": true,
7090
7425
  "docs": {
@@ -7095,7 +7430,7 @@
7095
7430
  "immutable": true,
7096
7431
  "locationInModule": {
7097
7432
  "filename": "src/root-constructs/nextjs-global-functions.ts",
7098
- "line": 61
7433
+ "line": 43
7099
7434
  },
7100
7435
  "name": "distribution",
7101
7436
  "optional": true,
@@ -7112,7 +7447,7 @@
7112
7447
  "immutable": true,
7113
7448
  "locationInModule": {
7114
7449
  "filename": "src/root-constructs/nextjs-global-functions.ts",
7115
- "line": 65
7450
+ "line": 47
7116
7451
  },
7117
7452
  "name": "overrides",
7118
7453
  "optional": true,
@@ -7360,89 +7695,291 @@
7360
7695
  {
7361
7696
  "abstract": true,
7362
7697
  "docs": {
7363
- "stability": "stable",
7364
- "summary": "CloudFront Distribution to invalidate."
7698
+ "stability": "stable",
7699
+ "summary": "CloudFront Distribution to invalidate."
7700
+ },
7701
+ "immutable": true,
7702
+ "locationInModule": {
7703
+ "filename": "src/nextjs-post-deploy.ts",
7704
+ "line": 48
7705
+ },
7706
+ "name": "distribution",
7707
+ "optional": true,
7708
+ "type": {
7709
+ "fqn": "aws-cdk-lib.aws_cloudfront.IDistribution"
7710
+ }
7711
+ },
7712
+ {
7713
+ "abstract": true,
7714
+ "docs": {
7715
+ "stability": "stable",
7716
+ "summary": "Override props for every construct."
7717
+ },
7718
+ "immutable": true,
7719
+ "locationInModule": {
7720
+ "filename": "src/nextjs-post-deploy.ts",
7721
+ "line": 52
7722
+ },
7723
+ "name": "overrides",
7724
+ "optional": true,
7725
+ "type": {
7726
+ "fqn": "cdk-nextjs.NextjsPostDeployOverrides"
7727
+ }
7728
+ },
7729
+ {
7730
+ "abstract": true,
7731
+ "docs": {
7732
+ "see": "{@link NextjsBaseProps.relativePathToPackage }",
7733
+ "stability": "stable"
7734
+ },
7735
+ "immutable": true,
7736
+ "locationInModule": {
7737
+ "filename": "src/nextjs-post-deploy.ts",
7738
+ "line": 56
7739
+ },
7740
+ "name": "relativePathToPackage",
7741
+ "optional": true,
7742
+ "type": {
7743
+ "primitive": "string"
7744
+ }
7745
+ },
7746
+ {
7747
+ "abstract": true,
7748
+ "docs": {
7749
+ "stability": "stable",
7750
+ "summary": "Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`."
7751
+ },
7752
+ "immutable": true,
7753
+ "locationInModule": {
7754
+ "filename": "src/nextjs-post-deploy.ts",
7755
+ "line": 60
7756
+ },
7757
+ "name": "staticAssetsBucket",
7758
+ "optional": true,
7759
+ "type": {
7760
+ "fqn": "aws-cdk-lib.aws_s3.Bucket"
7761
+ }
7762
+ }
7763
+ ],
7764
+ "symbolId": "src/nextjs-post-deploy:NextjsPostDeployProps"
7765
+ },
7766
+ "cdk-nextjs.NextjsRegionalContainers": {
7767
+ "assembly": "cdk-nextjs",
7768
+ "base": "cdk-nextjs.NextjsBaseConstruct",
7769
+ "docs": {
7770
+ "stability": "stable",
7771
+ "summary": "Deploy Next.js load balanced with containers. Uses [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) for load balancing and [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) for containers."
7772
+ },
7773
+ "fqn": "cdk-nextjs.NextjsRegionalContainers",
7774
+ "initializer": {
7775
+ "docs": {
7776
+ "stability": "stable"
7777
+ },
7778
+ "locationInModule": {
7779
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7780
+ "line": 53
7781
+ },
7782
+ "parameters": [
7783
+ {
7784
+ "name": "scope",
7785
+ "type": {
7786
+ "fqn": "constructs.Construct"
7787
+ }
7788
+ },
7789
+ {
7790
+ "name": "id",
7791
+ "type": {
7792
+ "primitive": "string"
7793
+ }
7794
+ },
7795
+ {
7796
+ "name": "props",
7797
+ "type": {
7798
+ "fqn": "cdk-nextjs.NextjsRegionalContainersProps"
7799
+ }
7800
+ }
7801
+ ]
7802
+ },
7803
+ "kind": "class",
7804
+ "locationInModule": {
7805
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7806
+ "line": 43
7807
+ },
7808
+ "name": "NextjsRegionalContainers",
7809
+ "properties": [
7810
+ {
7811
+ "docs": {
7812
+ "stability": "stable"
7813
+ },
7814
+ "immutable": true,
7815
+ "locationInModule": {
7816
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7817
+ "line": 45
7818
+ },
7819
+ "name": "url",
7820
+ "overrides": "cdk-nextjs.NextjsBaseConstruct",
7821
+ "type": {
7822
+ "primitive": "string"
7823
+ }
7824
+ },
7825
+ {
7826
+ "docs": {
7827
+ "stability": "stable"
7828
+ },
7829
+ "locationInModule": {
7830
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7831
+ "line": 44
7832
+ },
7833
+ "name": "nextjsContainers",
7834
+ "type": {
7835
+ "fqn": "cdk-nextjs.NextjsContainers"
7836
+ }
7837
+ }
7838
+ ],
7839
+ "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainers"
7840
+ },
7841
+ "cdk-nextjs.NextjsRegionalContainersConstructOverrides": {
7842
+ "assembly": "cdk-nextjs",
7843
+ "datatype": true,
7844
+ "docs": {
7845
+ "stability": "stable"
7846
+ },
7847
+ "fqn": "cdk-nextjs.NextjsRegionalContainersConstructOverrides",
7848
+ "interfaces": [
7849
+ "cdk-nextjs.NextjsBaseConstructOverrides"
7850
+ ],
7851
+ "kind": "interface",
7852
+ "locationInModule": {
7853
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7854
+ "line": 15
7855
+ },
7856
+ "name": "NextjsRegionalContainersConstructOverrides",
7857
+ "properties": [
7858
+ {
7859
+ "abstract": true,
7860
+ "docs": {
7861
+ "stability": "stable"
7365
7862
  },
7366
7863
  "immutable": true,
7367
7864
  "locationInModule": {
7368
- "filename": "src/nextjs-post-deploy.ts",
7369
- "line": 48
7865
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7866
+ "line": 17
7370
7867
  },
7371
- "name": "distribution",
7868
+ "name": "nextjsContainerProps",
7372
7869
  "optional": true,
7373
7870
  "type": {
7374
- "fqn": "aws-cdk-lib.aws_cloudfront.IDistribution"
7871
+ "fqn": "cdk-nextjs.OptionalNextjsContainersProps"
7375
7872
  }
7376
- },
7873
+ }
7874
+ ],
7875
+ "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersConstructOverrides"
7876
+ },
7877
+ "cdk-nextjs.NextjsRegionalContainersOverrides": {
7878
+ "assembly": "cdk-nextjs",
7879
+ "datatype": true,
7880
+ "docs": {
7881
+ "remarks": "Overrides are lower level than\nprops and are passed directly to CDK Constructs giving you more control. It's\nrecommended to use caution and review source code so you know how they're used.",
7882
+ "stability": "stable",
7883
+ "summary": "Overrides for `NextjsRegionalContainers`."
7884
+ },
7885
+ "fqn": "cdk-nextjs.NextjsRegionalContainersOverrides",
7886
+ "interfaces": [
7887
+ "cdk-nextjs.NextjsBaseOverrides"
7888
+ ],
7889
+ "kind": "interface",
7890
+ "locationInModule": {
7891
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7892
+ "line": 25
7893
+ },
7894
+ "name": "NextjsRegionalContainersOverrides",
7895
+ "properties": [
7377
7896
  {
7378
7897
  "abstract": true,
7379
7898
  "docs": {
7380
- "stability": "stable",
7381
- "summary": "Override props for every construct."
7899
+ "stability": "stable"
7382
7900
  },
7383
7901
  "immutable": true,
7384
7902
  "locationInModule": {
7385
- "filename": "src/nextjs-post-deploy.ts",
7386
- "line": 52
7903
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7904
+ "line": 27
7387
7905
  },
7388
- "name": "overrides",
7906
+ "name": "nextjsContainers",
7389
7907
  "optional": true,
7390
7908
  "type": {
7391
- "fqn": "cdk-nextjs.NextjsPostDeployOverrides"
7909
+ "fqn": "cdk-nextjs.NextjsContainersOverrides"
7392
7910
  }
7393
7911
  },
7394
7912
  {
7395
7913
  "abstract": true,
7396
7914
  "docs": {
7397
- "see": "{@link NextjsBaseProps.relativePathToPackage }",
7398
7915
  "stability": "stable"
7399
7916
  },
7400
7917
  "immutable": true,
7401
7918
  "locationInModule": {
7402
- "filename": "src/nextjs-post-deploy.ts",
7403
- "line": 56
7919
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7920
+ "line": 26
7404
7921
  },
7405
- "name": "relativePathToPackage",
7922
+ "name": "nextjsRegionalContainers",
7406
7923
  "optional": true,
7407
7924
  "type": {
7408
- "primitive": "string"
7925
+ "fqn": "cdk-nextjs.NextjsRegionalContainersConstructOverrides"
7409
7926
  }
7410
- },
7927
+ }
7928
+ ],
7929
+ "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersOverrides"
7930
+ },
7931
+ "cdk-nextjs.NextjsRegionalContainersProps": {
7932
+ "assembly": "cdk-nextjs",
7933
+ "datatype": true,
7934
+ "docs": {
7935
+ "stability": "stable"
7936
+ },
7937
+ "fqn": "cdk-nextjs.NextjsRegionalContainersProps",
7938
+ "interfaces": [
7939
+ "cdk-nextjs.NextjsBaseProps"
7940
+ ],
7941
+ "kind": "interface",
7942
+ "locationInModule": {
7943
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7944
+ "line": 30
7945
+ },
7946
+ "name": "NextjsRegionalContainersProps",
7947
+ "properties": [
7411
7948
  {
7412
7949
  "abstract": true,
7413
7950
  "docs": {
7414
7951
  "stability": "stable",
7415
- "summary": "Required for `NextjsType.GlobalFunctions` and `NextjsType.GlobalContainers`."
7952
+ "summary": "Override props of any construct."
7416
7953
  },
7417
7954
  "immutable": true,
7418
7955
  "locationInModule": {
7419
- "filename": "src/nextjs-post-deploy.ts",
7420
- "line": 60
7956
+ "filename": "src/root-constructs/nextjs-regional-containers.ts",
7957
+ "line": 34
7421
7958
  },
7422
- "name": "staticAssetsBucket",
7959
+ "name": "overrides",
7423
7960
  "optional": true,
7424
7961
  "type": {
7425
- "fqn": "aws-cdk-lib.aws_s3.Bucket"
7962
+ "fqn": "cdk-nextjs.NextjsRegionalContainersOverrides"
7426
7963
  }
7427
7964
  }
7428
7965
  ],
7429
- "symbolId": "src/nextjs-post-deploy:NextjsPostDeployProps"
7966
+ "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersProps"
7430
7967
  },
7431
- "cdk-nextjs.NextjsRegionalContainers": {
7968
+ "cdk-nextjs.NextjsRegionalFunctions": {
7432
7969
  "assembly": "cdk-nextjs",
7433
- "base": "constructs.Construct",
7970
+ "base": "cdk-nextjs.NextjsBaseConstruct",
7434
7971
  "docs": {
7435
7972
  "stability": "stable",
7436
- "summary": "Deploy Next.js load balanced with containers. Uses [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) for load balancing and [AWS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) for containers."
7973
+ "summary": "Deploy Next.js regionally with functions. Uses API Gateway REST API for routing requests and AWS Lambda Functions for server-side rendering."
7437
7974
  },
7438
- "fqn": "cdk-nextjs.NextjsRegionalContainers",
7975
+ "fqn": "cdk-nextjs.NextjsRegionalFunctions",
7439
7976
  "initializer": {
7440
7977
  "docs": {
7441
7978
  "stability": "stable"
7442
7979
  },
7443
7980
  "locationInModule": {
7444
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7445
- "line": 59
7981
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
7982
+ "line": 54
7446
7983
  },
7447
7984
  "parameters": [
7448
7985
  {
@@ -7460,42 +7997,31 @@
7460
7997
  {
7461
7998
  "name": "props",
7462
7999
  "type": {
7463
- "fqn": "cdk-nextjs.NextjsRegionalContainersProps"
8000
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsProps"
7464
8001
  }
7465
8002
  }
7466
8003
  ]
7467
8004
  },
7468
8005
  "kind": "class",
7469
8006
  "locationInModule": {
7470
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7471
- "line": 48
8007
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8008
+ "line": 45
7472
8009
  },
7473
- "name": "NextjsRegionalContainers",
8010
+ "name": "NextjsRegionalFunctions",
7474
8011
  "properties": [
7475
8012
  {
7476
8013
  "docs": {
7477
8014
  "stability": "stable"
7478
8015
  },
8016
+ "immutable": true,
7479
8017
  "locationInModule": {
7480
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7481
- "line": 52
7482
- },
7483
- "name": "nextjsAssetsDeployment",
7484
- "type": {
7485
- "fqn": "cdk-nextjs.NextjsAssetsDeployment"
7486
- }
7487
- },
7488
- {
7489
- "docs": {
7490
- "stability": "stable"
7491
- },
7492
- "locationInModule": {
7493
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7494
- "line": 49
8018
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8019
+ "line": 48
7495
8020
  },
7496
- "name": "nextjsBuild",
8021
+ "name": "url",
8022
+ "overrides": "cdk-nextjs.NextjsBaseConstruct",
7497
8023
  "type": {
7498
- "fqn": "cdk-nextjs.NextjsBuild"
8024
+ "primitive": "string"
7499
8025
  }
7500
8026
  },
7501
8027
  {
@@ -7503,12 +8029,12 @@
7503
8029
  "stability": "stable"
7504
8030
  },
7505
8031
  "locationInModule": {
7506
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7507
- "line": 53
8032
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8033
+ "line": 47
7508
8034
  },
7509
- "name": "nextjsContainers",
8035
+ "name": "nextjsApi",
7510
8036
  "type": {
7511
- "fqn": "cdk-nextjs.NextjsContainers"
8037
+ "fqn": "cdk-nextjs.NextjsApi"
7512
8038
  }
7513
8039
  },
7514
8040
  {
@@ -7516,59 +8042,87 @@
7516
8042
  "stability": "stable"
7517
8043
  },
7518
8044
  "locationInModule": {
7519
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7520
- "line": 51
8045
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8046
+ "line": 46
7521
8047
  },
7522
- "name": "nextjsFileSystem",
8048
+ "name": "nextjsFunctions",
7523
8049
  "type": {
7524
- "fqn": "cdk-nextjs.NextjsFileSystem"
8050
+ "fqn": "cdk-nextjs.NextjsFunctions"
7525
8051
  }
7526
- },
8052
+ }
8053
+ ],
8054
+ "symbolId": "src/root-constructs/nextjs-regional-functions:NextjsRegionalFunctions"
8055
+ },
8056
+ "cdk-nextjs.NextjsRegionalFunctionsConstructOverrides": {
8057
+ "assembly": "cdk-nextjs",
8058
+ "datatype": true,
8059
+ "docs": {
8060
+ "stability": "stable"
8061
+ },
8062
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsConstructOverrides",
8063
+ "interfaces": [
8064
+ "cdk-nextjs.NextjsBaseConstructOverrides"
8065
+ ],
8066
+ "kind": "interface",
8067
+ "locationInModule": {
8068
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8069
+ "line": 17
8070
+ },
8071
+ "name": "NextjsRegionalFunctionsConstructOverrides",
8072
+ "properties": [
7527
8073
  {
8074
+ "abstract": true,
7528
8075
  "docs": {
7529
8076
  "stability": "stable"
7530
8077
  },
8078
+ "immutable": true,
7531
8079
  "locationInModule": {
7532
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7533
- "line": 54
8080
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8081
+ "line": 20
7534
8082
  },
7535
- "name": "nextjsPostDeploy",
8083
+ "name": "nextjsApiProps",
8084
+ "optional": true,
7536
8085
  "type": {
7537
- "fqn": "cdk-nextjs.NextjsPostDeploy"
8086
+ "fqn": "cdk-nextjs.NextjsApiProps"
7538
8087
  }
7539
8088
  },
7540
8089
  {
8090
+ "abstract": true,
7541
8091
  "docs": {
7542
8092
  "stability": "stable"
7543
8093
  },
8094
+ "immutable": true,
7544
8095
  "locationInModule": {
7545
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7546
- "line": 50
8096
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8097
+ "line": 19
7547
8098
  },
7548
- "name": "nextjsVpc",
8099
+ "name": "nextjsFunctionsProps",
8100
+ "optional": true,
7549
8101
  "type": {
7550
- "fqn": "cdk-nextjs.NextjsVpc"
8102
+ "fqn": "cdk-nextjs.NextjsFunctionsProps"
7551
8103
  }
7552
8104
  }
7553
8105
  ],
7554
- "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainers"
8106
+ "symbolId": "src/root-constructs/nextjs-regional-functions:NextjsRegionalFunctionsConstructOverrides"
7555
8107
  },
7556
- "cdk-nextjs.NextjsRegionalContainersConstructOverrides": {
8108
+ "cdk-nextjs.NextjsRegionalFunctionsOverrides": {
7557
8109
  "assembly": "cdk-nextjs",
7558
8110
  "datatype": true,
7559
8111
  "docs": {
7560
- "stability": "stable"
8112
+ "remarks": "Overrides are lower level than\nprops and are passed directly to CDK Constructs giving you more control. It's\nrecommended to use caution and review source code so you know how they're used.",
8113
+ "stability": "stable",
8114
+ "summary": "Overrides for `NextjsRegionalFunctions`."
7561
8115
  },
7562
- "fqn": "cdk-nextjs.NextjsRegionalContainersConstructOverrides",
8116
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsOverrides",
7563
8117
  "interfaces": [
7564
- "cdk-nextjs.BaseNextjsConstructOverrides"
8118
+ "cdk-nextjs.NextjsBaseOverrides"
7565
8119
  ],
7566
8120
  "kind": "interface",
7567
8121
  "locationInModule": {
7568
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7569
- "line": 20
8122
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8123
+ "line": 28
7570
8124
  },
7571
- "name": "NextjsRegionalContainersConstructOverrides",
8125
+ "name": "NextjsRegionalFunctionsOverrides",
7572
8126
  "properties": [
7573
8127
  {
7574
8128
  "abstract": true,
@@ -7577,37 +8131,15 @@
7577
8131
  },
7578
8132
  "immutable": true,
7579
8133
  "locationInModule": {
7580
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7581
- "line": 22
8134
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8135
+ "line": 31
7582
8136
  },
7583
- "name": "nextjsContainerProps",
8137
+ "name": "nextjsApi",
7584
8138
  "optional": true,
7585
8139
  "type": {
7586
- "fqn": "cdk-nextjs.OptionalNextjsContainersProps"
8140
+ "fqn": "cdk-nextjs.NextjsApiOverrides"
7587
8141
  }
7588
- }
7589
- ],
7590
- "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersConstructOverrides"
7591
- },
7592
- "cdk-nextjs.NextjsRegionalContainersOverrides": {
7593
- "assembly": "cdk-nextjs",
7594
- "datatype": true,
7595
- "docs": {
7596
- "remarks": "Overrides are lower level than\nprops and are passed directly to CDK Constructs giving you more control. It's\nrecommended to use caution and review source code so you know how they're used.",
7597
- "stability": "stable",
7598
- "summary": "Overrides for `NextjsRegionalContainers`."
7599
- },
7600
- "fqn": "cdk-nextjs.NextjsRegionalContainersOverrides",
7601
- "interfaces": [
7602
- "cdk-nextjs.BaseNextjsOverrides"
7603
- ],
7604
- "kind": "interface",
7605
- "locationInModule": {
7606
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7607
- "line": 30
7608
- },
7609
- "name": "NextjsRegionalContainersOverrides",
7610
- "properties": [
8142
+ },
7611
8143
  {
7612
8144
  "abstract": true,
7613
8145
  "docs": {
@@ -7615,13 +8147,13 @@
7615
8147
  },
7616
8148
  "immutable": true,
7617
8149
  "locationInModule": {
7618
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7619
- "line": 32
8150
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8151
+ "line": 30
7620
8152
  },
7621
- "name": "nextjsContainers",
8153
+ "name": "nextjsFunctions",
7622
8154
  "optional": true,
7623
8155
  "type": {
7624
- "fqn": "cdk-nextjs.NextjsContainersOverrides"
8156
+ "fqn": "cdk-nextjs.NextjsFunctionsOverrides"
7625
8157
  }
7626
8158
  },
7627
8159
  {
@@ -7631,34 +8163,34 @@
7631
8163
  },
7632
8164
  "immutable": true,
7633
8165
  "locationInModule": {
7634
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7635
- "line": 31
8166
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8167
+ "line": 29
7636
8168
  },
7637
- "name": "nextjsRegionalContainers",
8169
+ "name": "nextjsRegionalFunctions",
7638
8170
  "optional": true,
7639
8171
  "type": {
7640
- "fqn": "cdk-nextjs.NextjsRegionalContainersConstructOverrides"
8172
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsConstructOverrides"
7641
8173
  }
7642
8174
  }
7643
8175
  ],
7644
- "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersOverrides"
8176
+ "symbolId": "src/root-constructs/nextjs-regional-functions:NextjsRegionalFunctionsOverrides"
7645
8177
  },
7646
- "cdk-nextjs.NextjsRegionalContainersProps": {
8178
+ "cdk-nextjs.NextjsRegionalFunctionsProps": {
7647
8179
  "assembly": "cdk-nextjs",
7648
8180
  "datatype": true,
7649
8181
  "docs": {
7650
8182
  "stability": "stable"
7651
8183
  },
7652
- "fqn": "cdk-nextjs.NextjsRegionalContainersProps",
8184
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsProps",
7653
8185
  "interfaces": [
7654
8186
  "cdk-nextjs.NextjsBaseProps"
7655
8187
  ],
7656
8188
  "kind": "interface",
7657
8189
  "locationInModule": {
7658
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7659
- "line": 35
8190
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8191
+ "line": 34
7660
8192
  },
7661
- "name": "NextjsRegionalContainersProps",
8193
+ "name": "NextjsRegionalFunctionsProps",
7662
8194
  "properties": [
7663
8195
  {
7664
8196
  "abstract": true,
@@ -7668,17 +8200,17 @@
7668
8200
  },
7669
8201
  "immutable": true,
7670
8202
  "locationInModule": {
7671
- "filename": "src/root-constructs/nextjs-regional-containers.ts",
7672
- "line": 39
8203
+ "filename": "src/root-constructs/nextjs-regional-functions.ts",
8204
+ "line": 38
7673
8205
  },
7674
8206
  "name": "overrides",
7675
8207
  "optional": true,
7676
8208
  "type": {
7677
- "fqn": "cdk-nextjs.NextjsRegionalContainersOverrides"
8209
+ "fqn": "cdk-nextjs.NextjsRegionalFunctionsOverrides"
7678
8210
  }
7679
8211
  }
7680
8212
  ],
7681
- "symbolId": "src/root-constructs/nextjs-regional-containers:NextjsRegionalContainersProps"
8213
+ "symbolId": "src/root-constructs/nextjs-regional-functions:NextjsRegionalFunctionsProps"
7682
8214
  },
7683
8215
  "cdk-nextjs.NextjsStaticAssets": {
7684
8216
  "assembly": "cdk-nextjs",
@@ -7694,7 +8226,7 @@
7694
8226
  },
7695
8227
  "locationInModule": {
7696
8228
  "filename": "src/nextjs-static-assets.ts",
7697
- "line": 30
8229
+ "line": 26
7698
8230
  },
7699
8231
  "parameters": [
7700
8232
  {
@@ -7720,7 +8252,7 @@
7720
8252
  "kind": "class",
7721
8253
  "locationInModule": {
7722
8254
  "filename": "src/nextjs-static-assets.ts",
7723
- "line": 25
8255
+ "line": 21
7724
8256
  },
7725
8257
  "name": "NextjsStaticAssets",
7726
8258
  "properties": [
@@ -7730,7 +8262,7 @@
7730
8262
  },
7731
8263
  "locationInModule": {
7732
8264
  "filename": "src/nextjs-static-assets.ts",
7733
- "line": 26
8265
+ "line": 22
7734
8266
  },
7735
8267
  "name": "bucket",
7736
8268
  "type": {
@@ -7802,23 +8334,6 @@
7802
8334
  "type": {
7803
8335
  "fqn": "cdk-nextjs.NextjsStaticAssetsOverrides"
7804
8336
  }
7805
- },
7806
- {
7807
- "abstract": true,
7808
- "docs": {
7809
- "stability": "stable",
7810
- "summary": "Required if `NextjsType.REGIONAL_CONTAINERS`."
7811
- },
7812
- "immutable": true,
7813
- "locationInModule": {
7814
- "filename": "src/nextjs-static-assets.ts",
7815
- "line": 19
7816
- },
7817
- "name": "vpcId",
7818
- "optional": true,
7819
- "type": {
7820
- "primitive": "string"
7821
- }
7822
8337
  }
7823
8338
  ],
7824
8339
  "symbolId": "src/nextjs-static-assets:NextjsStaticAssetsProps"
@@ -7852,6 +8367,12 @@
7852
8367
  "stability": "stable"
7853
8368
  },
7854
8369
  "name": "REGIONAL_CONTAINERS"
8370
+ },
8371
+ {
8372
+ "docs": {
8373
+ "stability": "stable"
8374
+ },
8375
+ "name": "REGIONAL_FUNCTIONS"
7855
8376
  }
7856
8377
  ],
7857
8378
  "name": "NextjsType",
@@ -13190,7 +13711,7 @@
13190
13711
  "abstract": true,
13191
13712
  "docs": {
13192
13713
  "stability": "stable",
13193
- "summary": "Path to directory of Next.js app's public directory. Used to add static behaviors to distribution."
13714
+ "summary": "Entries (files/directories) within Next.js app's public directory. Used to add static behaviors to distribution."
13194
13715
  },
13195
13716
  "immutable": true,
13196
13717
  "locationInModule": {
@@ -14399,6 +14920,6 @@
14399
14920
  "symbolId": "src/nextjs-build/nextjs-build:PublicDirEntry"
14400
14921
  }
14401
14922
  },
14402
- "version": "0.4.2",
14403
- "fingerprint": "yE73lbdN5N5mIeiO7ipZOFVfjUpSZ2q+34Lq+IzP/48="
14923
+ "version": "0.4.3",
14924
+ "fingerprint": "gZlv5xxphGKy5YHU/LxHXuarJHZXeHzCsHOybf7Ug+U="
14404
14925
  }