cdk-nextjs 0.5.15 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +821 -253
- package/.jsii.tabl.json +1 -1
- package/API.md +787 -18
- package/README.md +3 -3
- package/docs/breaking-changes.md +86 -0
- package/docs/caching-guide.md +6 -0
- package/docs/plans/adapter-runtime-release.md +362 -0
- package/docs/plans/phase-0-image-function-opt-in.md +295 -0
- package/lib/generated-structs/OptionalNextjsDistributionProps.d.ts +13 -0
- package/lib/generated-structs/OptionalNextjsDistributionProps.js +1 -1
- package/lib/image-optimization/handler-utils.d.ts +34 -0
- package/lib/image-optimization/handler-utils.js +83 -0
- package/lib/image-optimization/handler-utils.test.d.ts +1 -0
- package/lib/image-optimization/handler-utils.test.js +178 -0
- package/lib/image-optimization/handler.mjs +56126 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +4 -2
- package/lib/nextjs-api.d.ts +44 -0
- package/lib/nextjs-api.js +64 -20
- package/lib/nextjs-api.test.d.ts +1 -0
- package/lib/nextjs-api.test.js +144 -0
- package/lib/nextjs-build/nextjs-build.d.ts +60 -0
- package/lib/nextjs-build/nextjs-build.js +184 -27
- package/lib/nextjs-cache.js +1 -1
- package/lib/nextjs-compute/nextjs-containers.js +1 -1
- package/lib/nextjs-compute/nextjs-functions.js +1 -1
- package/lib/nextjs-compute/nextjs-image-function.d.ts +53 -0
- package/lib/nextjs-compute/nextjs-image-function.js +59 -0
- package/lib/nextjs-distribution.d.ts +33 -0
- package/lib/nextjs-distribution.js +39 -11
- package/lib/nextjs-post-deploy.js +1 -1
- package/lib/nextjs-static-assets.d.ts +18 -0
- package/lib/nextjs-static-assets.js +33 -6
- package/lib/nextjs-static-assets.test.d.ts +1 -0
- package/lib/nextjs-static-assets.test.js +58 -0
- package/lib/root-constructs/nextjs-base-construct.d.ts +62 -2
- package/lib/root-constructs/nextjs-base-construct.js +81 -3
- package/lib/root-constructs/nextjs-global-containers.d.ts +6 -1
- package/lib/root-constructs/nextjs-global-containers.js +11 -5
- package/lib/root-constructs/nextjs-global-functions.d.ts +16 -5
- package/lib/root-constructs/nextjs-global-functions.js +23 -21
- package/lib/root-constructs/nextjs-regional-containers.js +1 -1
- package/lib/root-constructs/nextjs-regional-functions.d.ts +11 -5
- package/lib/root-constructs/nextjs-regional-functions.js +17 -21
- package/lib/utils/base-path.d.ts +40 -0
- package/lib/utils/base-path.js +123 -0
- package/lib/utils/base-path.test.d.ts +1 -0
- package/lib/utils/base-path.test.js +163 -0
- package/lib/utils/experimental-flags.d.ts +24 -0
- package/lib/utils/experimental-flags.js +30 -0
- package/lib/utils/get-architecture.d.ts +10 -0
- package/lib/utils/get-architecture.js +17 -2
- package/package.json +3 -1
package/.jsii
CHANGED
|
@@ -9032,7 +9032,7 @@
|
|
|
9032
9032
|
},
|
|
9033
9033
|
"name": "cdk-nextjs",
|
|
9034
9034
|
"readme": {
|
|
9035
|
-
"markdown": "\n[](https://www.npmjs.org/package/cdk-nextjs)\n\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nDeploy [Next.js](https://nextjs.org/) apps on [AWS](https://aws.amazon.com/) with the [AWS CDK](https://aws.amazon.com/cdk/).\n\n## Features\n\n- Supports all features of Next.js App and Pages Router for [Node.js Runtime](https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#nodejs-runtime).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`, `NextjsRegionalFunctions`.\n- Global Content Delivery Network (CDN) built with [Amazon CloudFront](https://aws.amazon.com/cloudfront/) to deliver content with low latency and high transfer speeds.\n- Serverless functions powered by [AWS Lambda](https://aws.amazon.com/lambda/) or serverless containers powered by [AWS Fargate](https://aws.amazon.com/fargate/).\n- Static assets (JS, CSS, public folder) are stored and served from [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) for all constructs (except `NextjsRegionalContainers`) to decrease latency and reduce compute costs by serving directly from S3.\n- [Optimized images](https://nextjs.org/docs/pages/building-your-application/optimizing/images), [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), and [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache) are shared across compute with [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) with supporting metadata in [Amazon DynamoDB](https://aws.amazon.com/dynamodb).\n- Customize every construct via `overrides`.\n- AWS security and operational best practices are utilized, guided by [cdk-nag](https://github.com/cdklabs/cdk-nag).\n- First class support for [monorepos](https://monorepo.tools/).\n- [Bring Your Own Resources](#bring-your-own-resources) — import existing AWS resources (CloudFront distributions, ECS clusters, ALBs, S3 buckets, DynamoDB tables).\n- [AWS GovCloud (US)](https://aws.amazon.com/govcloud-us) compatible with `NextjsRegionalFunctions` and `NextjsRegionalContainers`.\n\n## Prerequisites\n\n- Next.js app running v16.2 or higher. If you don't have one yet - follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n- [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app either in the same package or separate package. cdk-nextjs supports monorepos.\n- Docker compatible container engine - we recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby).\n- [Node.js](https://nodejs.org/en) v24 (or LTS)\n\n## Getting Started\n\n1. Install `cdk-nextjs` in the package(s) containing your CDK and Next.js app with `npm i cdk-nextjs`\n2. Update next.config.ts to include `adapterPath`:\n\n```ts\nimport { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n```\n\n3. Deploy your Next.js app to AWS: `cdk deploy`. Make sure you have [AWS credentials](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-configure.html) configured.\n4. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\n\n### cdk-nextjs Created Dockerfile\n\ncdk-nextjs will generate a Dockerfile in your Next.js app's directory. cdk-nextjs does not have the ability to clean up the Dockerfile after the container is built so you can either add it to source control or gitignore it. When detectd, cdk-nextjs will not overwrite this Dockerfile so you're free to customize it.\n\n## Basic Example CDK App\n\n```ts\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n```\n\nSee [examples/](./examples/) for more usage examples.\n\n## Configuration\n\ncdk-nextjs supports configuration via environment variables. These are automatically set by the construct during deployment, but you can override them for custom behavior.\n\n### Cache Configuration\n\n#### `CDK_NEXTJS_MEMORY_CACHE_TTL_MS`\n\nTime to live in milliseconds for in-memory cache entries. After this duration, entries expire and are removed from the cache.\n\n**Important**: Due to the distributed nature of compute instances (Lambda functions, ECS Fargate containers, etc.), the memory cache by default provides eventual consistency across instances. Tag revalidations will clear the cache on the instance that processes the revalidation, but other instances may serve stale data until their cache entries expire. If you require strong consistency, set this to `0` to disable the memory cache (all requests will fall through to S3 + DynamoDB).\n\n**Default**: `3600000` (1 hour)\n\n**Examples**:\n\n- Short TTL (5 minutes): `300000` - for frequently changing data\n- Medium TTL (1 hour): `3600000` - balanced between freshness and performance\n- Long TTL (24 hours): `86400000` - for mostly static content\n\n**Trade-offs**:\n\n- Lower values: More cache misses, fresher data, higher S3/DynamoDB costs\n- Higher values: Fewer cache misses, better performance, but longer stale data windows\n\n#### `CDK_NEXTJS_MEMORY_CACHE_MAX_ENTRIES`\n\nMaximum number of cache entries to store in memory. When this limit is reached, the least recently used (LRU) entry is evicted.\n\n**Default**: `1000`\n\n**Examples**:\n\n- Small cache: `100` - minimal memory footprint for simple apps\n- Medium cache: `1000` - good balance for typical applications\n- Large cache: `10000` - for high-traffic apps with many unique pages\n\n**Trade-offs**:\n\n- Lower values: Less memory usage, more cache evictions\n- Higher values: More memory usage, fewer cache evictions, better hit rates\n\n**Memory considerations**: Each entry stores the full cache value (HTML, JSON, etc.). A typical page cache might be 10-100KB, so 1000 entries ≈ 10-100MB of memory. Consider your compute environment's memory limits (Lambda: 128MB-10GB, Fargate: 512MB-30GB) and size accordingly.\n\n### Infrastructure Configuration\n\nThe following environment variables are automatically set by the construct and typically don't need to be modified:\n\n#### `CDK_NEXTJS_BUILD_ID`\n\nUnique identifier for the Next.js build. Used for cache isolation between deployments.\n\n#### `CDK_NEXTJS_CACHE_BUCKET_NAME`\n\nS3 bucket name for storing cached data (optimized images, data cache, full route cache).\n\n#### `CDK_NEXTJS_REVALIDATION_TABLE_NAME`\n\nDynamoDB table name for tracking cache revalidations and tag-to-cache-key mappings.\n\n#### `DEBUG`\n\nSet to `cdk-nextjs:*` to set debug logs. This is especially useful to see cache handler activity.\n\n## Architecture\n\n### `NextjsGlobalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this construct when you have unpredictable traffic, can afford occasional latency (i.e. cold starts - [typically 1% of production traffic](https://aws.amazon.com/blogs/compute/operating-lambda-performance-optimization-part-1/)), and/or want the most granular pricing model. ([code](./src/root-constructs/nextjs-global-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n### `NextjsGlobalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this option when you have predictable traffic, need the lowest latency, and/or can afford a less granular pricing model. ([code](./src/root-constructs/nextjs-global-containers.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/) to regionally serve requests. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-containers.ts#L41))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [API Gateway REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html) to regionally serve requests and distribute static assets. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service apigateway(server)[API Gateway REST API] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:apigateway\n apigateway:R --> L:s3static\n apigateway:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n## Why\n\nThe simplest path to deploy Next.js is on [Vercel](https://vercel.com/) - the Platform-as-a-Service company behind Next.js. However, deploying to Vercel can be expensive and some developers want all of their workloads running _directly_ on AWS. Developers can deploy Next.js on AWS through [AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-Amplifysupport.html), but Amplify does not support all Next.js features and manages AWS resources for you so they cannot be customized. If Amplify meets your requirements we recommend you use it, but if you want to use all Next.js features or want more visibility into the AWS resources then this construct is for you.\n\n## Design Principles\n\n- Treat Next.js as black box. Minimize reliance on Next.js internal APIs to reduce chance of incompatibility between this construct and future versions of Next.js.\n- Security first.\n- One architecture does not fit all.\n- Enable customization everywhere.\n\n## Bring Your Own Resources\n\ncdk-nextjs supports importing existing AWS resources instead of creating new ones. This is especially useful for per-branch (MR/PR) environments where you deploy shared infrastructure once and spin up lightweight branch stacks that reuse it.\n\n### Supported Resources\n\n| Resource | Prop | Available On |\n| --------------------------- | -------------------- | ---------------------------------------------------- |\n| S3 Cache Bucket | `cacheBucket` | All constructs |\n| DynamoDB Revalidation Table | `revalidationTable` | All constructs |\n| S3 Static Assets Bucket | `staticAssetsBucket` | All constructs |\n| CloudFront Distribution | `distribution` | `NextjsGlobalFunctions`, `NextjsGlobalContainers` |\n| ECS Cluster | `ecsCluster` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n| ALB | `alb` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n\n### Resource Isolation\n\n- **Cache bucket and DynamoDB table** are isolated by `buildId` prefix. Multiple branches safely share one bucket/table with no conflicts.\n- **Static assets bucket** — Next.js includes content hashes in static asset filenames, so different branches deploying the same file will produce identical content. It's safe for branches to overwrite each other. If you're already using `basePath` for routing, assets will naturally be prefixed by it.\n\n### Shared ALB and `removeAutoCreatedListener()`\n\n`ApplicationLoadBalancedFargateService` always creates a listener on port 80 — there is no opt-out. When you import an ALB that already has a listener on that port, the duplicate causes a deployment failure. Since CDK doesn't expose a way to prevent this, `removeAutoCreatedListener()` surgically removes the generated CloudFormation resources: the `CfnListener`, its security group ingress rule, rebuilds the ECS service `DependsOn` without the deleted listener, and removes auto-created `CfnOutput` resources:\n\n```ts\nconst nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();\n```\n\n### Examples\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a complete deployable example with shared infrastructure and per-branch host-header routing.\n\n## Preview Environments (Per-Branch Deployments)\n\ncdk-nextjs can deploy ephemeral preview environments per merge request (MR) or pull request (PR). The recommended approach uses subdomain-based routing (`pr-123.app.example.com`) so each preview environment runs the same Next.js build as production — no `basePath` configuration or separate builds required.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a fully deployable example using `NextjsRegionalContainers` with a shared ALB, ECS Cluster, S3 buckets, and DynamoDB table — connected via SSM Parameter Store.\n\n### Prerequisites\n\n- Wildcard DNS record: `*.app.example.com` → your routing layer (ALB, CloudFront, API Gateway)\n- Wildcard ACM certificate: `*.app.example.com`\n\n### Per-Architecture Recommendations\n\n#### `NextjsGlobalContainers` and `NextjsRegionalContainers` (ALB-based)\n\nSubdomain routing via ALB host-based listener rules. This is the fastest and simplest approach. For `NextjsGlobalContainers`, CloudFront forwards the `Host` header to the ALB origin, so the ALB handles all branch routing — no CloudFront changes needed per branch.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for the full implementation.\n\n#### `NextjsRegionalFunctions` (API Gateway)\n\nSubdomain routing via API Gateway custom domain mappings.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a cdk-nextjs stack that imports shared resources and creates its own API Gateway\n3. Create an API Gateway custom domain (`pr-123.app.example.com`) mapped to the branch's API stage\n4. Tear down the branch stack on MR close\n\n#### `NextjsGlobalFunctions` (Lambda + CloudFront)\n\nRequires a separate cdk-nextjs stack per branch, each with its own CloudFront distribution. CloudFront cannot route to different Lambda Function URL origins based on the `Host` header — origin selection is determined by cache behavior path patterns, not request headers.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a full cdk-nextjs stack that imports shared resources (`cacheBucket`, `revalidationTable`, `staticAssetsBucket`) but creates its own CloudFront distribution and Lambda function\n3. Point `pr-123.app.example.com` DNS to the branch's CloudFront distribution\n4. Tear down the branch stack on MR close\n\nNote: CloudFront distributions take several minutes to create/update, so this architecture has the slowest preview environment spin-up time.\n\n## Limitations\n\n- If using `NextjsGlobalFunctions` or `NextjsGlobalContainers` (which use CloudFront), the number of top level files/directories cannot exceed 25, the max number of behaviors a CloudFront Distribution supports. We recommend you put all of your public assets into one top level directory (i.e. public/static) so you don't reach this limit. See [CloudFront Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) for more information.\n- If using `NextjsGlobalFunctions`, when [revalidating data in Next.js](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#on-demand-revalidation) (i.e. [revalidatePath](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)), the CloudFront Cache will still hold stale data. You'll need to use AWS SDK JS V3 [CreateInvalidationCommand](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudfront/Class/CreateInvalidationCommand/) to manually invalidate the path in CloudFront. See more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html).\n- If using `NextjsGlobalFunctions`, setting an Authorization header won't work by default because of Lambda Function URL with IAM Auth is already using the Authorization header. You can use the `AWS_LWA_AUTHORIZATION_SOURCE` environment variable of [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to set an alternative Authorization header in the client which will then be set to the Authorization header when it reaches your app.\n- `NextjsRegionalFunctions` doesn't support streaming because API Gateway doesn't support streaming yet.\n- If using `NextjsRegionalFunctions` without a custom domain, API Gateway REST APIs require a [stage name](https://docs.aws.amazon.com/apigateway/latest/developerguide/set-up-stages.html) (default: `/prod`) to be specified. This causes links to pages and static assets to break because they're not prefixed with the stage name. You can work around this issue by specifying [basePath](https://nextjs.org/docs/app/api-reference/config/next-config-js/basePath) in next.config.js as your stage name. Additionally, you'll need to add middleware logic to rewrite requests to include the stage name because API Gateway does not include the stage name in the path passed to Lambda. See [examples/app-playground/middleware.ts](./examples/app-playground/middleware.ts).\n\n## Additional Security Recommendations\n\nThis construct by default implements all AWS security best practices that a CDK construct library reasonably can considering cost and complexity. Below are additional security practices we recommend you implement within your CDK app. Please see them below:\n\n- [VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html). See [examples/](./examples) for sample implementation.\n- [Scan ECR Images For Vulnerabilities](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html).\n- For `NextjsGlobalFunctions` and `NextjsGlobalContainers`, [CloudFront Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html). See [examples/](./examples) for sample implementation.\n- For `NextjsGlobalContainers` and `NextjsRegionalContainers`, use [ALB HTTPS Listener](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)\n- If using `NextjsGlobalContainers` and `NextjsRegionalContainers`, enable `ReadonlyRootFilesystem`. This will remove ability to use Static On-Demand feature of Next.js so it's not enabled by default, but is recommended for security.\n\n## Estimated Costs\n\n### Assumptions\n\nThe following basic assumptions were used for a typical medium Next.js app. See [docs/usage.xlsx](./docs/usage.xlsx) for detailed assumptions and usage per construct type that you can plug into AWS Pricing Calculator.\n\n| Metric | Value |\n| ------------------------------------------------------------ | ----- |\n| Monthly Active Users | 1K |\n| Pages Visited Per Month Per User | 100 |\n| Avg Request Size | 50KB |\n| Static Requests Per Page (js, css, etc) | 15 |\n| Static Requests Cache Hit % | 50% |\n| Static Assets Size | 10GB |\n| Dynamic Requests Per Page (document, optimized images, etc.) | 5 |\n| Dynamic Cache Read % | 50% |\n| Dynamic Cache Write % | 5% |\n| Dynamic Cache Data Size | 10GB |\n| Average Dynamic Cache Request Size | 100KB |\n| Dynamic Revalidate Tag % | 1% |\n\nMore Details:\n\n- Assume ARM architecture for compute\n- AWS Region: us-east-1\n- Excludes charges related to: CloudWatch Logs, NAT Gateway data processing\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=23611f6fea87ef05d5fe87c33135ddde43b17a98)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ---------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $8.09 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=02f0073e612d1eee2a7ccace2c636adc5f0acab7)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------- | ---------------------------- |\n| ECS Fargate | 1 task (1 vCPU, 2 GB) | $28.44 |\n| ALB | 1 LB, 1.04GB/hr, 5.79 conn/sec | $22.50 |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $121.25 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=e214abe60eb4e24fc5866d07ef4355393261af3c)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ------------------------------------------ | ---------------------------- |\n| ECS Fargate | 1 task (2 vCPU, 4 GB), always on | $28.44 |\n| ALB | 1 LB, 4.17 GB/hr, 23.15 conn/sec | $40.78 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $139.00 |\n\n### NextjsRegionalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=60da38c7993c1baeee2fee4bd19ba6441608bb15)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| API Gateway | 2M requests | $7.00 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $11.08 |\n\n## Performance\n\n[Artillery Playwright](https://www.artillery.io/docs/reference/engines/playwright#overview) app playground example load tests results with 1K concurrent users. Reproduce with `pnpm test-fargate:lg` within `examples/load-tests`.\n\n### NextjsGlobalFunctions\n\n<details>\n<summary>`NextjsGlobalFunctions` Performance Details</summary>\n\n```bash\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr:\n min: ......................................................................... 6.3\n max: ......................................................................... 5017.4\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 22.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/1:\n min: ......................................................................... 3.2\n max: ......................................................................... 560.6\n mean: ........................................................................ 9.4\n median: ...................................................................... 5.4\n p95: ......................................................................... 11.1\n p99: ......................................................................... 162.4\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/2:\n min: ......................................................................... 3.1\n max: ......................................................................... 1511.9\n mean: ........................................................................ 9.2\n median: ...................................................................... 5.2\n p95: ......................................................................... 10.7\n p99: ......................................................................... 149.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/3:\n min: ......................................................................... 3.4\n max: ......................................................................... 131.1\n mean: ........................................................................ 7.1\n median: ...................................................................... 5.3\n p95: ......................................................................... 10.1\n p99: ......................................................................... 64.7\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.1\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg/3:\n min: ......................................................................... 2.9\n max: ......................................................................... 98\n mean: ........................................................................ 5.1\n median: ...................................................................... 4.6\n p95: ......................................................................... 8.2\n p99: ......................................................................... 12.8\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr:\n min: ......................................................................... 6.4\n max: ......................................................................... 5018.6\n mean: ........................................................................ 11.3\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr/2:\n min: ......................................................................... 83.4\n max: ......................................................................... 150.7\n mean: ........................................................................ 119\n median: ...................................................................... 111.1\n p95: ......................................................................... 147\n p99: ......................................................................... 147\nbrowser.page.TTFB.https://abc123.cloudfront.net/streaming:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.2\n mean: ........................................................................ 11.8\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\n```\n\n</details>\n\n\n\n### NextjsGlobalContainers\n\n<details>\n<summary>`NextjsGlobalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n### NextjsRegionalContainers\n\n<details>\n<summary>`NextjsRegionalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n### NextjsRegionalFunctions\n\n<details>\n<summary>`NextjsRegionalFunctions` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n## Guides\n\n- [Caching Guide](./docs/caching-guide.md)\n- [Pruning Guide](./docs/pruning-guide.md)\n- [Next Build Output Guide](./docs/next-build-output-guide.ts)\n- [Development Guide](./docs/development-guide.ts)\n\n## Contributing\n\nSteps to build locally:\n\n1. `git clone https://github.com/cdklabs/cdk-nextjs.git`\n2. `cd cdk-nextjs`\n3. `pnpm i && pnpm compile && pnpm build`\n\nThis project uses Projen, so make sure to not edit [Projen](https://projen.io/) created files and only edit .projenrc.ts.\n\n## FAQ\n\nQ: How does this compare to [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs)?<br/>\nA: cdk-nextjs-standalone relies on [OpenNext](https://github.com/sst/open-next). OpenNext injects custom code to interact with private Next.js APIs. While OpenNext is able to make some optimizations that are great for serverless environments, this comes at an increase maintenance cost and increased chances for breaking changes. A goal of cdk-nextjs is to customize Next.js as little as possible to reduce the maintenance burden and decrease chances of breaking changes.\n\nQ: Why does cdk-nextjs depend upon Next.js v16.2 or higher?\nA: This version is required for [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath#image-optimization-caching) so that cdk-nextjs can depend upon public Next.js API.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: See [Caching Guide](./docs/caching-guide.md)\n\nQ: How customizable is the `cdk-nextjs` package for different use cases?<br/>\nA: The `cdk-nextjs` package offers deep customization through _prop-based_ overrides. These can be accessed in the construct props, allowing you to override settings like VPC configurations, CloudFront distribution, and ECS/Fargate setup. For example, you can modify `nextjsBuildProps` to customize the build process or use `nextjsDistributionProps` to adjust how CloudFront handles caching and routing. This level of control makes it easy to adapt the infrastructure to your application’s specific performance, networking, or deployment needs.\n\nQ: How can I use a custom domain with `cdk-nextjs`?<br/>\nA: See [low-cost example](./examples/low-cost/app.ts).\n\nQ: What is difference between `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` and `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps`<br/>\nA: `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` allows you to customize any construct's props _within_ `NextjsDistribution` and is likely what you want whereas `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps` allows you to customize the props passed into the construct: `NextjsDistribution`. This principle also applies to other similarly named overrides.\n\nQ: Why use container image for `NextjsGlobalFunctions`?<br />\nA: Read [The case for containers on Lambda (with benchmarks)](https://aaronstuyvenberg.com/posts/containers-on-lambda). Also, we depend upon [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to transform lambda event payloads into HTTP requests that Next.js expects.\n\nQ: How can I `cdk bootstrap --cloudformation-execution-policies ...` my AWS Account with limited permissions for cdk-nextjs to deploy?<br />\nA: See [docs/cdk-nextjs-cfn-exec-policy.json](./docs/cdk-nextjs-cfn-exec-policy.json). Note, this IAM Policy is scoped to all cdk-nextjs constructs so you can remove services if you know the construct you're using doesn't use that service.\n\n## Acknowledgements\n\nThis construct was built on the shoulders of giants. Thank you to the contributors of [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs) and [open-next](https://github.com/sst/open-next).\n\n## 🥂 Thanks Contributors\n\nThank you for helping other developers deploy Next.js apps on AWS\n\n<a href=\"https://github.com/cdklabs/cdk-nextjs/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=cdklabs/cdk-nextjs\" />\n</a>\n"
|
|
9035
|
+
"markdown": "\n[](https://www.npmjs.org/package/cdk-nextjs)\n\n\n# CDK Next.js Construct Library\n\n<!--BEGIN STABILITY BANNER-->\n\n---\n\n\n\n> The APIs of higher level constructs in this module are experimental and under active development.\n> They are subject to non-backward compatible changes or removal in any future version. These are\n> not subject to the [Semantic Versioning](https://semver.org/) model and breaking changes will be\n> announced in the release notes. This means that while you may use them, you may need to update\n> your source code when upgrading to a newer version of this package.\n\n---\n\n<!--END STABILITY BANNER-->\n\nDeploy [Next.js](https://nextjs.org/) apps on [AWS](https://aws.amazon.com/) with the [AWS CDK](https://aws.amazon.com/cdk/).\n\n## Features\n\n- Supports all features of Next.js App and Pages Router for [Node.js Runtime](https://nextjs.org/docs/app/building-your-application/rendering/edge-and-nodejs-runtimes#nodejs-runtime).\n- Choose your AWS architecture for Next.js with the supported constructs: `NextjsGlobalFunctions`, `NextjsGlobalContainers`, `NextjsRegionalContainers`, `NextjsRegionalFunctions`.\n- Global Content Delivery Network (CDN) built with [Amazon CloudFront](https://aws.amazon.com/cloudfront/) to deliver content with low latency and high transfer speeds.\n- Serverless functions powered by [AWS Lambda](https://aws.amazon.com/lambda/) or serverless containers powered by [AWS Fargate](https://aws.amazon.com/fargate/).\n- Static assets (JS, CSS, public folder) are stored and served from [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) for all constructs (except `NextjsRegionalContainers`) to decrease latency and reduce compute costs by serving directly from S3.\n- [Optimized images](https://nextjs.org/docs/pages/building-your-application/optimizing/images), [data cache](https://nextjs.org/docs/app/building-your-application/caching#data-cache), and [full route cache](https://nextjs.org/docs/app/building-your-application/caching#full-route-cache) are shared across compute with [Amazon Simple Storage Service (S3)](https://aws.amazon.com/s3/) with supporting metadata in [Amazon DynamoDB](https://aws.amazon.com/dynamodb).\n- Customize every construct via `overrides`.\n- AWS security and operational best practices are utilized, guided by [cdk-nag](https://github.com/cdklabs/cdk-nag).\n- First class support for [monorepos](https://monorepo.tools/).\n- [Bring Your Own Resources](#bring-your-own-resources) — import existing AWS resources (CloudFront distributions, ECS clusters, ALBs, S3 buckets, DynamoDB tables).\n- [AWS GovCloud (US)](https://aws.amazon.com/govcloud-us) compatible with `NextjsRegionalFunctions` and `NextjsRegionalContainers`.\n\n## Prerequisites\n\n- Next.js app running v16.2 or higher. If you don't have one yet - follow [these steps](https://nextjs.org/docs/getting-started) to create one.\n- [AWS Cloud Development Kit](https://docs.aws.amazon.com/cdk/v2/guide/home.html) app either in the same package or separate package. cdk-nextjs supports monorepos.\n- Docker compatible container engine - we recommend [Rancher Desktop](https://rancherdesktop.io/) with dockerd (moby).\n- [Node.js](https://nodejs.org/en) v24 (or LTS)\n\n## Getting Started\n\n1. Install `cdk-nextjs` in the package(s) containing your CDK and Next.js app with `npm i cdk-nextjs`\n2. Update next.config.ts to include `adapterPath`:\n\n```ts\nimport { NextConfig } from \"next\";\n\nconst nextConfig: NextConfig = {\n // ...\n adapterPath: import.meta.resolve(\"cdk-nextjs/adapter\"), // for ESM\n // adapterPath: require.resolve(\"cdk-nextjs/adapter\"), // for CJS\n};\n\nexport default nextConfig;\n```\n\n3. Deploy your Next.js app to AWS: `cdk deploy`. Make sure you have [AWS credentials](https://docs.aws.amazon.com/cli/v1/userguide/cli-chap-configure.html) configured.\n4. Visit URL printed in terminal (CloudFormation Output) to view your Next.js app!\n\n### cdk-nextjs Created Dockerfile\n\ncdk-nextjs will generate a Dockerfile in your Next.js app's directory. cdk-nextjs does not have the ability to clean up the Dockerfile after the container is built so you can either add it to source control or gitignore it. When detectd, cdk-nextjs will not overwrite this Dockerfile so you're free to customize it.\n\n## Basic Example CDK App\n\n```ts\nimport { App, Stack, StackProps } from \"aws-cdk-lib\";\nimport { Construct } from \"constructs\";\nimport { NextjsGlobalFunctions } from \"cdk-nextjs\";\nimport { join } from \"node:path\";\n\nclass WebStack extends Stack {\n constructor(scope: Construct, id: string, props?: StackProps) {\n super(scope, id, props);\n new NextjsGlobalFunctions(this, \"Nextjs\", {\n buildDirectory: join(import.meta.dirname),\n healthCheckPath: \"/api/health\",\n });\n }\n}\n\nconst app = new App();\n\nnew WebStack(app, \"web-stack\");\n```\n\nSee [examples/](./examples/) for more usage examples.\n\n## Configuration\n\ncdk-nextjs supports configuration via environment variables. These are automatically set by the construct during deployment, but you can override them for custom behavior.\n\n### Cache Configuration\n\n#### `CDK_NEXTJS_MEMORY_CACHE_TTL_MS`\n\nTime to live in milliseconds for in-memory cache entries. After this duration, entries expire and are removed from the cache.\n\n**Important**: Due to the distributed nature of compute instances (Lambda functions, ECS Fargate containers, etc.), the memory cache by default provides eventual consistency across instances. Tag revalidations will clear the cache on the instance that processes the revalidation, but other instances may serve stale data until their cache entries expire. If you require strong consistency, set this to `0` to disable the memory cache (all requests will fall through to S3 + DynamoDB).\n\n**Default**: `3600000` (1 hour)\n\n**Examples**:\n\n- Short TTL (5 minutes): `300000` - for frequently changing data\n- Medium TTL (1 hour): `3600000` - balanced between freshness and performance\n- Long TTL (24 hours): `86400000` - for mostly static content\n\n**Trade-offs**:\n\n- Lower values: More cache misses, fresher data, higher S3/DynamoDB costs\n- Higher values: Fewer cache misses, better performance, but longer stale data windows\n\n#### `CDK_NEXTJS_MEMORY_CACHE_MAX_ENTRIES`\n\nMaximum number of cache entries to store in memory. When this limit is reached, the least recently used (LRU) entry is evicted.\n\n**Default**: `1000`\n\n**Examples**:\n\n- Small cache: `100` - minimal memory footprint for simple apps\n- Medium cache: `1000` - good balance for typical applications\n- Large cache: `10000` - for high-traffic apps with many unique pages\n\n**Trade-offs**:\n\n- Lower values: Less memory usage, more cache evictions\n- Higher values: More memory usage, fewer cache evictions, better hit rates\n\n**Memory considerations**: Each entry stores the full cache value (HTML, JSON, etc.). A typical page cache might be 10-100KB, so 1000 entries ≈ 10-100MB of memory. Consider your compute environment's memory limits (Lambda: 128MB-10GB, Fargate: 512MB-30GB) and size accordingly.\n\n### Infrastructure Configuration\n\nThe following environment variables are automatically set by the construct and typically don't need to be modified:\n\n#### `CDK_NEXTJS_BUILD_ID`\n\nUnique identifier for the Next.js build. Used for cache isolation between deployments.\n\n#### `CDK_NEXTJS_CACHE_BUCKET_NAME`\n\nS3 bucket name for storing cached data (optimized images, data cache, full route cache).\n\n#### `CDK_NEXTJS_REVALIDATION_TABLE_NAME`\n\nDynamoDB table name for tracking cache revalidations and tag-to-cache-key mappings.\n\n#### `DEBUG`\n\nSet to `cdk-nextjs:*` to set debug logs. This is especially useful to see cache handler activity.\n\n## Architecture\n\n### `NextjsGlobalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this construct when you have unpredictable traffic, can afford occasional latency (i.e. cold starts - [typically 1% of production traffic](https://aws.amazon.com/blogs/compute/operating-lambda-performance-optimization-part-1/)), and/or want the most granular pricing model. ([code](./src/root-constructs/nextjs-global-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n### `NextjsGlobalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [CloudFront](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Introduction.html) Distribution to globally serve requests and distribute static assets. Use this option when you have predictable traffic, need the lowest latency, and/or can afford a less granular pricing model. ([code](./src/root-constructs/nextjs-global-containers.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service cloudfront(server)[CloudFront Distribution] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:cloudfront\n cloudfront:R --> L:s3static\n cloudfront:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalContainers`\n\nArchitecture includes [ECS Fargate](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/AWS_Fargate.html) containers to respond to dynamic requests and [Application Load Balancer](https://aws.amazon.com/elasticloadbalancing/application-load-balancer/) to regionally serve requests. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-containers.ts#L41))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group vpc[VPC] in aws\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service alb(server)[Application Load Balancer] in vpc\n service fargate(server)[ECS Fargate Containers] in vpc\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:alb\n alb:R --> L:fargate\n fargate:R --> L:dynamodb\n fargate:R --> L:s3cache\n```\n\n### `NextjsRegionalFunctions`\n\nArchitecture includes [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) Functions to respond to dynamic requests and [API Gateway REST API](https://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-rest-api.html) to regionally serve requests and distribute static assets. Use this options when you cannot use Amazon CloudFront (i.e. [AWS GovCloud](https://aws.amazon.com/govcloud-us/?whats-new.sort-by=item.additionalFields.postDateTime&whats-new.sort-order=desc)). ([code](./src/root-constructs/nextjs-regional-functions.ts))\n\n```mermaid\narchitecture-beta\n group aws(cloud)[AWS Cloud]\n group cache[Cache Layer] in aws\n\n service user(internet)[User]\n service apigateway(server)[API Gateway REST API] in aws\n service s3static(disk)[S3 Static Assets] in aws\n service lambda(server)[Lambda Function] in aws\n service dynamodb(database)[DynamoDB Table] in cache\n service s3cache(disk)[S3 Cache Bucket] in cache\n\n user:R --> L:apigateway\n apigateway:R --> L:s3static\n apigateway:R --> L:lambda\n lambda:R --> L:dynamodb\n lambda:R --> L:s3cache\n```\n\n## Why\n\nThe simplest path to deploy Next.js is on [Vercel](https://vercel.com/) - the Platform-as-a-Service company behind Next.js. However, deploying to Vercel can be expensive and some developers want all of their workloads running _directly_ on AWS. Developers can deploy Next.js on AWS through [AWS Amplify Hosting](https://docs.aws.amazon.com/amplify/latest/userguide/ssr-Amplifysupport.html), but Amplify does not support all Next.js features and manages AWS resources for you so they cannot be customized. If Amplify meets your requirements we recommend you use it, but if you want to use all Next.js features or want more visibility into the AWS resources then this construct is for you.\n\n## Design Principles\n\n- Treat Next.js as black box. Minimize reliance on Next.js internal APIs to reduce chance of incompatibility between this construct and future versions of Next.js.\n- Security first.\n- One architecture does not fit all.\n- Enable customization everywhere.\n\n## Bring Your Own Resources\n\ncdk-nextjs supports importing existing AWS resources instead of creating new ones. This is especially useful for per-branch (MR/PR) environments where you deploy shared infrastructure once and spin up lightweight branch stacks that reuse it.\n\n### Supported Resources\n\n| Resource | Prop | Available On |\n| --------------------------- | -------------------- | ---------------------------------------------------- |\n| S3 Cache Bucket | `cacheBucket` | All constructs |\n| DynamoDB Revalidation Table | `revalidationTable` | All constructs |\n| S3 Static Assets Bucket | `staticAssetsBucket` | All constructs |\n| CloudFront Distribution | `distribution` | `NextjsGlobalFunctions`, `NextjsGlobalContainers` |\n| ECS Cluster | `ecsCluster` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n| ALB | `alb` | `NextjsGlobalContainers`, `NextjsRegionalContainers` |\n\n### Resource Isolation\n\n- **Cache bucket and DynamoDB table** are isolated by `buildId` prefix. Multiple branches safely share one bucket/table with no conflicts.\n- **Static assets bucket** — Next.js includes content hashes in static asset filenames, so different branches deploying the same file will produce identical content. It's safe for branches to overwrite each other. If you're already using `basePath` for routing, assets will naturally be prefixed by it — `NextjsGlobalFunctions` and `NextjsGlobalContainers` read the `basePath` out of your Next.js build and use it as the S3 key prefix, since CloudFront serves assets from S3 by request path and the two can't differ. Set the `basePath` prop only if you want to be explicit about it; a value that disagrees with your app's fails at synth.\n\n### Shared ALB and `removeAutoCreatedListener()`\n\n`ApplicationLoadBalancedFargateService` always creates a listener on port 80 — there is no opt-out. When you import an ALB that already has a listener on that port, the duplicate causes a deployment failure. Since CDK doesn't expose a way to prevent this, `removeAutoCreatedListener()` surgically removes the generated CloudFormation resources: the `CfnListener`, its security group ingress rule, rebuilds the ECS service `DependsOn` without the deleted listener, and removes auto-created `CfnOutput` resources:\n\n```ts\nconst nextjs = new NextjsRegionalContainers(this, \"Nextjs\", {\n // ...\n alb: sharedAlb,\n ecsCluster: sharedCluster,\n});\nnextjs.nextjsContainers.removeAutoCreatedListener();\n```\n\n### Examples\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a complete deployable example with shared infrastructure and per-branch host-header routing.\n\n## Preview Environments (Per-Branch Deployments)\n\ncdk-nextjs can deploy ephemeral preview environments per merge request (MR) or pull request (PR). The recommended approach uses subdomain-based routing (`pr-123.app.example.com`) so each preview environment runs the same Next.js build as production — no `basePath` configuration or separate builds required.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for a fully deployable example using `NextjsRegionalContainers` with a shared ALB, ECS Cluster, S3 buckets, and DynamoDB table — connected via SSM Parameter Store.\n\n### Prerequisites\n\n- Wildcard DNS record: `*.app.example.com` → your routing layer (ALB, CloudFront, API Gateway)\n- Wildcard ACM certificate: `*.app.example.com`\n\n### Per-Architecture Recommendations\n\n#### `NextjsGlobalContainers` and `NextjsRegionalContainers` (ALB-based)\n\nSubdomain routing via ALB host-based listener rules. This is the fastest and simplest approach. For `NextjsGlobalContainers`, CloudFront forwards the `Host` header to the ALB origin, so the ALB handles all branch routing — no CloudFront changes needed per branch.\n\nSee [examples/bring-your-own/](./examples/bring-your-own/) for the full implementation.\n\n#### `NextjsRegionalFunctions` (API Gateway)\n\nSubdomain routing via API Gateway custom domain mappings.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a cdk-nextjs stack that imports shared resources and creates its own API Gateway\n3. Create an API Gateway custom domain (`pr-123.app.example.com`) mapped to the branch's API stage\n4. Tear down the branch stack on MR close\n\n#### `NextjsGlobalFunctions` (Lambda + CloudFront)\n\nRequires a separate cdk-nextjs stack per branch, each with its own CloudFront distribution. CloudFront cannot route to different Lambda Function URL origins based on the `Host` header — origin selection is determined by cache behavior path patterns, not request headers.\n\n1. Deploy shared infrastructure once: S3 buckets, DynamoDB table\n2. Per branch, deploy a full cdk-nextjs stack that imports shared resources (`cacheBucket`, `revalidationTable`, `staticAssetsBucket`) but creates its own CloudFront distribution and Lambda function\n3. Point `pr-123.app.example.com` DNS to the branch's CloudFront distribution\n4. Tear down the branch stack on MR close\n\nNote: CloudFront distributions take several minutes to create/update, so this architecture has the slowest preview environment spin-up time.\n\n## Limitations\n\n- If using `NextjsGlobalFunctions` or `NextjsGlobalContainers` (which use CloudFront), the number of top level files/directories cannot exceed 25, the max number of behaviors a CloudFront Distribution supports. We recommend you put all of your public assets into one top level directory (i.e. public/static) so you don't reach this limit. See [CloudFront Quotas](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cloudfront-limits.html) for more information.\n- If using `NextjsGlobalFunctions`, when [revalidating data in Next.js](https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#on-demand-revalidation) (i.e. [revalidatePath](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)), the CloudFront Cache will still hold stale data. You'll need to use AWS SDK JS V3 [CreateInvalidationCommand](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-cloudfront/Class/CreateInvalidationCommand/) to manually invalidate the path in CloudFront. See more [here](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html).\n- If using `NextjsGlobalFunctions`, setting an Authorization header won't work by default because of Lambda Function URL with IAM Auth is already using the Authorization header. You can use the `AWS_LWA_AUTHORIZATION_SOURCE` environment variable of [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to set an alternative Authorization header in the client which will then be set to the Authorization header when it reaches your app.\n- `NextjsRegionalFunctions` streaming depends on whether your server Lambda supports response streaming (e.g. [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter)'s `AWS_LWA_INVOKE_MODE`) — override `overrides.nextjsApi.dynamicIntegrationProps.responseTransferMode` to `BUFFERED` if it doesn't, otherwise API Gateway returns a 500 for every request.\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 — leave the construct's `basePath` prop unset when you do, since API Gateway strips the stage before matching resources. 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). Mapping a custom domain at the root avoids all of this — see [examples/regional-functions/README.md](./examples/regional-functions/README.md#with-a-custom-domain-no-stage-workarounds).\n\n## Additional Security Recommendations\n\nThis construct by default implements all AWS security best practices that a CDK construct library reasonably can considering cost and complexity. Below are additional security practices we recommend you implement within your CDK app. Please see them below:\n\n- [VPC Flow Logs](https://docs.aws.amazon.com/vpc/latest/userguide/flow-logs.html). See [examples/](./examples) for sample implementation.\n- [Scan ECR Images For Vulnerabilities](https://docs.aws.amazon.com/AmazonECR/latest/userguide/image-scanning.html).\n- For `NextjsGlobalFunctions` and `NextjsGlobalContainers`, [CloudFront Access Logs](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/AccessLogs.html). See [examples/](./examples) for sample implementation.\n- For `NextjsGlobalContainers` and `NextjsRegionalContainers`, use [ALB HTTPS Listener](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html)\n- If using `NextjsGlobalContainers` and `NextjsRegionalContainers`, enable `ReadonlyRootFilesystem`. This will remove ability to use Static On-Demand feature of Next.js so it's not enabled by default, but is recommended for security.\n\n## Estimated Costs\n\n### Assumptions\n\nThe following basic assumptions were used for a typical medium Next.js app. See [docs/usage.xlsx](./docs/usage.xlsx) for detailed assumptions and usage per construct type that you can plug into AWS Pricing Calculator.\n\n| Metric | Value |\n| ------------------------------------------------------------ | ----- |\n| Monthly Active Users | 1K |\n| Pages Visited Per Month Per User | 100 |\n| Avg Request Size | 50KB |\n| Static Requests Per Page (js, css, etc) | 15 |\n| Static Requests Cache Hit % | 50% |\n| Static Assets Size | 10GB |\n| Dynamic Requests Per Page (document, optimized images, etc.) | 5 |\n| Dynamic Cache Read % | 50% |\n| Dynamic Cache Write % | 5% |\n| Dynamic Cache Data Size | 10GB |\n| Average Dynamic Cache Request Size | 100KB |\n| Dynamic Revalidate Tag % | 1% |\n\nMore Details:\n\n- Assume ARM architecture for compute\n- AWS Region: us-east-1\n- Excludes charges related to: CloudWatch Logs, NAT Gateway data processing\n\n### NextjsGlobalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=23611f6fea87ef05d5fe87c33135ddde43b17a98)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ---------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $8.09 |\n\n### NextjsGlobalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=02f0073e612d1eee2a7ccace2c636adc5f0acab7)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------- | ---------------------------- |\n| ECS Fargate | 1 task (1 vCPU, 2 GB) | $28.44 |\n| ALB | 1 LB, 1.04GB/hr, 5.79 conn/sec | $22.50 |\n| CloudFront | 2M requests, 100 GB transfer to internet | $0.00 (Always Free Tier) |\n| S3 | 20 GB storage, 1M GET, 250K PUT requests | $2.11 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $121.25 |\n\n### NextjsRegionalContainers\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=e214abe60eb4e24fc5866d07ef4355393261af3c)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ------------------------------------------ | ---------------------------- |\n| ECS Fargate | 1 task (2 vCPU, 4 GB), always on | $28.44 |\n| ALB | 1 LB, 4.17 GB/hr, 23.15 conn/sec | $40.78 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| VPC | NAT Gateway, 2 AZs | $65.70 |\n| Total | | $139.00 |\n\n### NextjsRegionalFunctions\n\n[AWS Pricing Calculator](https://calculator.aws/#/estimate?id=60da38c7993c1baeee2fee4bd19ba6441608bb15)\n\n| Service | Monthly Usage | Estimated Monthly Cost (USD) |\n| ----------- | ---------------------------------------------- | ---------------------------- |\n| Lambda | 500K requests, 2 GB memory, 150ms avg duration | $0.00 (Always Free Tier) |\n| API Gateway | 2M requests | $7.00 |\n| S3 | 10 GB storage, 250K GET, 250K PUT requests | $1.58 |\n| DynamoDB | 10 GB storage, 5K Reads, 5K Writes | $2.50 |\n| Total | | $11.08 |\n\n## Performance\n\n[Artillery Playwright](https://www.artillery.io/docs/reference/engines/playwright#overview) app playground example load tests results with 1K concurrent users. Reproduce with `pnpm test-fargate:lg` within `examples/load-tests`.\n\n### NextjsGlobalFunctions\n\n<details>\n<summary>`NextjsGlobalFunctions` Performance Details</summary>\n\n```bash\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr:\n min: ......................................................................... 6.3\n max: ......................................................................... 5017.4\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 22.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/1:\n min: ......................................................................... 3.2\n max: ......................................................................... 560.6\n mean: ........................................................................ 9.4\n median: ...................................................................... 5.4\n p95: ......................................................................... 11.1\n p99: ......................................................................... 162.4\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/2:\n min: ......................................................................... 3.1\n max: ......................................................................... 1511.9\n mean: ........................................................................ 9.2\n median: ...................................................................... 5.2\n p95: ......................................................................... 10.7\n p99: ......................................................................... 149.9\nbrowser.page.TTFB.https://abc123.cloudfront.net/isr/3:\n min: ......................................................................... 3.4\n max: ......................................................................... 131.1\n mean: ........................................................................ 7.1\n median: ...................................................................... 5.3\n p95: ......................................................................... 10.1\n p99: ......................................................................... 64.7\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.1\n mean: ........................................................................ 11.5\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssg/3:\n min: ......................................................................... 2.9\n max: ......................................................................... 98\n mean: ........................................................................ 5.1\n median: ...................................................................... 4.6\n p95: ......................................................................... 8.2\n p99: ......................................................................... 12.8\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr:\n min: ......................................................................... 6.4\n max: ......................................................................... 5018.6\n mean: ........................................................................ 11.3\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\nbrowser.page.TTFB.https://abc123.cloudfront.net/ssr/2:\n min: ......................................................................... 83.4\n max: ......................................................................... 150.7\n mean: ........................................................................ 119\n median: ...................................................................... 111.1\n p95: ......................................................................... 147\n p99: ......................................................................... 147\nbrowser.page.TTFB.https://abc123.cloudfront.net/streaming:\n min: ......................................................................... 6.4\n max: ......................................................................... 5015.2\n mean: ........................................................................ 11.8\n median: ...................................................................... 10.3\n p95: ......................................................................... 15.6\n p99: ......................................................................... 23.3\n```\n\n</details>\n\n\n\n### NextjsGlobalContainers\n\n<details>\n<summary>`NextjsGlobalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n### NextjsRegionalContainers\n\n<details>\n<summary>`NextjsRegionalContainers` Performance Details</summary>\n\n```bash\nTODO\n```\n\n### NextjsRegionalFunctions\n\n<details>\n<summary>`NextjsRegionalFunctions` Performance Details</summary>\n\n```bash\nTODO\n```\n\n</details>\n\n## Guides\n\n- [Caching Guide](./docs/caching-guide.md)\n- [Pruning Guide](./docs/pruning-guide.md)\n- [Next Build Output Guide](./docs/next-build-output-guide.ts)\n- [Development Guide](./docs/development-guide.ts)\n\n## Contributing\n\nSteps to build locally:\n\n1. `git clone https://github.com/cdklabs/cdk-nextjs.git`\n2. `cd cdk-nextjs`\n3. `pnpm i && pnpm compile && pnpm build`\n\nThis project uses Projen, so make sure to not edit [Projen](https://projen.io/) created files and only edit .projenrc.ts.\n\n## FAQ\n\nQ: How does this compare to [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs)?<br/>\nA: cdk-nextjs-standalone relies on [OpenNext](https://github.com/sst/open-next). OpenNext injects custom code to interact with private Next.js APIs. While OpenNext is able to make some optimizations that are great for serverless environments, this comes at an increase maintenance cost and increased chances for breaking changes. A goal of cdk-nextjs is to customize Next.js as little as possible to reduce the maintenance burden and decrease chances of breaking changes.\n\nQ: Why does cdk-nextjs depend upon Next.js v16.2 or higher?\nA: This version is required for [Image Optimization Caching](https://nextjs.org/docs/app/api-reference/config/next-config-js/incrementalCacheHandlerPath#image-optimization-caching) so that cdk-nextjs can depend upon public Next.js API.\n\nQ: How does cdk-nextjs support caching in Next.js?<br/>\nA: See [Caching Guide](./docs/caching-guide.md)\n\nQ: How customizable is the `cdk-nextjs` package for different use cases?<br/>\nA: The `cdk-nextjs` package offers deep customization through _prop-based_ overrides. These can be accessed in the construct props, allowing you to override settings like VPC configurations, CloudFront distribution, and ECS/Fargate setup. For example, you can modify `nextjsBuildProps` to customize the build process or use `nextjsDistributionProps` to adjust how CloudFront handles caching and routing. This level of control makes it easy to adapt the infrastructure to your application’s specific performance, networking, or deployment needs.\n\nQ: How can I use a custom domain with `cdk-nextjs`?<br/>\nA: See [low-cost example](./examples/low-cost/app.ts).\n\nQ: What is difference between `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` and `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps`<br/>\nA: `NextjsGlobalFunctionsProps.overrides.nextjsDistribution` allows you to customize any construct's props _within_ `NextjsDistribution` and is likely what you want whereas `NextjsGlobalFunctionsProps.overrides.nextjsGlobalFunctions.nextjsDistributionProps` allows you to customize the props passed into the construct: `NextjsDistribution`. This principle also applies to other similarly named overrides.\n\nQ: Why use container image for `NextjsGlobalFunctions`?<br />\nA: Read [The case for containers on Lambda (with benchmarks)](https://aaronstuyvenberg.com/posts/containers-on-lambda). Also, we depend upon [AWS Lambda Web Adapter](https://github.com/awslabs/aws-lambda-web-adapter) to transform lambda event payloads into HTTP requests that Next.js expects.\n\nQ: How can I `cdk bootstrap --cloudformation-execution-policies ...` my AWS Account with limited permissions for cdk-nextjs to deploy?<br />\nA: See [docs/cdk-nextjs-cfn-exec-policy.json](./docs/cdk-nextjs-cfn-exec-policy.json). Note, this IAM Policy is scoped to all cdk-nextjs constructs so you can remove services if you know the construct you're using doesn't use that service.\n\n## Acknowledgements\n\nThis construct was built on the shoulders of giants. Thank you to the contributors of [cdk-nextjs-standalone](https://github.com/jetbridge/cdk-nextjs) and [open-next](https://github.com/sst/open-next).\n\n## 🥂 Thanks Contributors\n\nThank you for helping other developers deploy Next.js apps on AWS\n\n<a href=\"https://github.com/cdklabs/cdk-nextjs/graphs/contributors\">\n <img src=\"https://contrib.rocks/image?repo=cdklabs/cdk-nextjs\" />\n</a>\n"
|
|
9036
9036
|
},
|
|
9037
9037
|
"repository": {
|
|
9038
9038
|
"type": "git",
|
|
@@ -9059,7 +9059,7 @@
|
|
|
9059
9059
|
},
|
|
9060
9060
|
"locationInModule": {
|
|
9061
9061
|
"filename": "src/nextjs-api.ts",
|
|
9062
|
-
"line":
|
|
9062
|
+
"line": 127
|
|
9063
9063
|
},
|
|
9064
9064
|
"parameters": [
|
|
9065
9065
|
{
|
|
@@ -9085,7 +9085,7 @@
|
|
|
9085
9085
|
"kind": "class",
|
|
9086
9086
|
"locationInModule": {
|
|
9087
9087
|
"filename": "src/nextjs-api.ts",
|
|
9088
|
-
"line":
|
|
9088
|
+
"line": 91
|
|
9089
9089
|
},
|
|
9090
9090
|
"name": "NextjsApi",
|
|
9091
9091
|
"properties": [
|
|
@@ -9097,12 +9097,28 @@
|
|
|
9097
9097
|
"immutable": true,
|
|
9098
9098
|
"locationInModule": {
|
|
9099
9099
|
"filename": "src/nextjs-api.ts",
|
|
9100
|
-
"line":
|
|
9100
|
+
"line": 95
|
|
9101
9101
|
},
|
|
9102
9102
|
"name": "api",
|
|
9103
9103
|
"type": {
|
|
9104
9104
|
"fqn": "aws-cdk-lib.aws_apigateway.RestApi"
|
|
9105
9105
|
}
|
|
9106
|
+
},
|
|
9107
|
+
{
|
|
9108
|
+
"docs": {
|
|
9109
|
+
"remarks": "Prefers a custom domain configured through `overrides.restApiProps.domainName`\nover the execute-api endpoint.\n\nA domain attached after this construct is created (`api.addDomainName()`) is\nstill used for the host, but CDK keeps its base path mappings private, so a\nmapping added that way won't show up here.",
|
|
9110
|
+
"stability": "stable",
|
|
9111
|
+
"summary": "Public URL of the app, including every path segment the API nests it under."
|
|
9112
|
+
},
|
|
9113
|
+
"immutable": true,
|
|
9114
|
+
"locationInModule": {
|
|
9115
|
+
"filename": "src/nextjs-api.ts",
|
|
9116
|
+
"line": 106
|
|
9117
|
+
},
|
|
9118
|
+
"name": "url",
|
|
9119
|
+
"type": {
|
|
9120
|
+
"primitive": "string"
|
|
9121
|
+
}
|
|
9106
9122
|
}
|
|
9107
9123
|
],
|
|
9108
9124
|
"symbolId": "src/nextjs-api:NextjsApi"
|
|
@@ -9117,7 +9133,7 @@
|
|
|
9117
9133
|
"kind": "interface",
|
|
9118
9134
|
"locationInModule": {
|
|
9119
9135
|
"filename": "src/nextjs-api.ts",
|
|
9120
|
-
"line":
|
|
9136
|
+
"line": 28
|
|
9121
9137
|
},
|
|
9122
9138
|
"name": "NextjsApiOverrides",
|
|
9123
9139
|
"properties": [
|
|
@@ -9129,7 +9145,7 @@
|
|
|
9129
9145
|
"immutable": true,
|
|
9130
9146
|
"locationInModule": {
|
|
9131
9147
|
"filename": "src/nextjs-api.ts",
|
|
9132
|
-
"line":
|
|
9148
|
+
"line": 32
|
|
9133
9149
|
},
|
|
9134
9150
|
"name": "dynamicIntegrationProps",
|
|
9135
9151
|
"optional": true,
|
|
@@ -9145,7 +9161,23 @@
|
|
|
9145
9161
|
"immutable": true,
|
|
9146
9162
|
"locationInModule": {
|
|
9147
9163
|
"filename": "src/nextjs-api.ts",
|
|
9148
|
-
"line":
|
|
9164
|
+
"line": 33
|
|
9165
|
+
},
|
|
9166
|
+
"name": "imageIntegrationProps",
|
|
9167
|
+
"optional": true,
|
|
9168
|
+
"type": {
|
|
9169
|
+
"fqn": "aws-cdk-lib.aws_apigateway.LambdaIntegrationOptions"
|
|
9170
|
+
}
|
|
9171
|
+
},
|
|
9172
|
+
{
|
|
9173
|
+
"abstract": true,
|
|
9174
|
+
"docs": {
|
|
9175
|
+
"stability": "stable"
|
|
9176
|
+
},
|
|
9177
|
+
"immutable": true,
|
|
9178
|
+
"locationInModule": {
|
|
9179
|
+
"filename": "src/nextjs-api.ts",
|
|
9180
|
+
"line": 29
|
|
9149
9181
|
},
|
|
9150
9182
|
"name": "restApiProps",
|
|
9151
9183
|
"optional": true,
|
|
@@ -9161,7 +9193,7 @@
|
|
|
9161
9193
|
"immutable": true,
|
|
9162
9194
|
"locationInModule": {
|
|
9163
9195
|
"filename": "src/nextjs-api.ts",
|
|
9164
|
-
"line":
|
|
9196
|
+
"line": 31
|
|
9165
9197
|
},
|
|
9166
9198
|
"name": "s3MethodOptions",
|
|
9167
9199
|
"optional": true,
|
|
@@ -9177,7 +9209,7 @@
|
|
|
9177
9209
|
"immutable": true,
|
|
9178
9210
|
"locationInModule": {
|
|
9179
9211
|
"filename": "src/nextjs-api.ts",
|
|
9180
|
-
"line":
|
|
9212
|
+
"line": 30
|
|
9181
9213
|
},
|
|
9182
9214
|
"name": "staticIntegrationProps",
|
|
9183
9215
|
"optional": true,
|
|
@@ -9198,7 +9230,7 @@
|
|
|
9198
9230
|
"kind": "interface",
|
|
9199
9231
|
"locationInModule": {
|
|
9200
9232
|
"filename": "src/nextjs-api.ts",
|
|
9201
|
-
"line":
|
|
9233
|
+
"line": 36
|
|
9202
9234
|
},
|
|
9203
9235
|
"name": "NextjsApiProps",
|
|
9204
9236
|
"properties": [
|
|
@@ -9211,7 +9243,7 @@
|
|
|
9211
9243
|
"immutable": true,
|
|
9212
9244
|
"locationInModule": {
|
|
9213
9245
|
"filename": "src/nextjs-api.ts",
|
|
9214
|
-
"line":
|
|
9246
|
+
"line": 49
|
|
9215
9247
|
},
|
|
9216
9248
|
"name": "publicDirEntries",
|
|
9217
9249
|
"type": {
|
|
@@ -9232,7 +9264,7 @@
|
|
|
9232
9264
|
"immutable": true,
|
|
9233
9265
|
"locationInModule": {
|
|
9234
9266
|
"filename": "src/nextjs-api.ts",
|
|
9235
|
-
"line":
|
|
9267
|
+
"line": 70
|
|
9236
9268
|
},
|
|
9237
9269
|
"name": "staticAssetsBucket",
|
|
9238
9270
|
"type": {
|
|
@@ -9248,7 +9280,7 @@
|
|
|
9248
9280
|
"immutable": true,
|
|
9249
9281
|
"locationInModule": {
|
|
9250
9282
|
"filename": "src/nextjs-api.ts",
|
|
9251
|
-
"line":
|
|
9283
|
+
"line": 40
|
|
9252
9284
|
},
|
|
9253
9285
|
"name": "basePath",
|
|
9254
9286
|
"optional": true,
|
|
@@ -9256,6 +9288,24 @@
|
|
|
9256
9288
|
"primitive": "string"
|
|
9257
9289
|
}
|
|
9258
9290
|
},
|
|
9291
|
+
{
|
|
9292
|
+
"abstract": true,
|
|
9293
|
+
"docs": {
|
|
9294
|
+
"remarks": "When\nomitted, no `_next/image` resource is created and those requests fall\nthrough to `serverFunction` via the `{proxy+}` catch-all.\n\nWhen provided, it is assumed to support Lambda response streaming (as the\ndedicated image Lambda this package builds does) and is invoked with\n`ResponseTransferMode.STREAM` accordingly. If you supply a custom\n`imageFunction` that doesn't support streaming, override\n`responseTransferMode` to `BUFFERED` via `overrides.imageIntegrationProps`,\notherwise API Gateway returns a 502.",
|
|
9295
|
+
"stability": "stable",
|
|
9296
|
+
"summary": "Dedicated image optimization Lambda for the `_next/image` route."
|
|
9297
|
+
},
|
|
9298
|
+
"immutable": true,
|
|
9299
|
+
"locationInModule": {
|
|
9300
|
+
"filename": "src/nextjs-api.ts",
|
|
9301
|
+
"line": 66
|
|
9302
|
+
},
|
|
9303
|
+
"name": "imageFunction",
|
|
9304
|
+
"optional": true,
|
|
9305
|
+
"type": {
|
|
9306
|
+
"fqn": "aws-cdk-lib.aws_lambda.IFunction"
|
|
9307
|
+
}
|
|
9308
|
+
},
|
|
9259
9309
|
{
|
|
9260
9310
|
"abstract": true,
|
|
9261
9311
|
"docs": {
|
|
@@ -9265,7 +9315,7 @@
|
|
|
9265
9315
|
"immutable": true,
|
|
9266
9316
|
"locationInModule": {
|
|
9267
9317
|
"filename": "src/nextjs-api.ts",
|
|
9268
|
-
"line":
|
|
9318
|
+
"line": 44
|
|
9269
9319
|
},
|
|
9270
9320
|
"name": "overrides",
|
|
9271
9321
|
"optional": true,
|
|
@@ -9283,7 +9333,7 @@
|
|
|
9283
9333
|
"immutable": true,
|
|
9284
9334
|
"locationInModule": {
|
|
9285
9335
|
"filename": "src/nextjs-api.ts",
|
|
9286
|
-
"line":
|
|
9336
|
+
"line": 53
|
|
9287
9337
|
},
|
|
9288
9338
|
"name": "serverFunction",
|
|
9289
9339
|
"optional": true,
|
|
@@ -9291,6 +9341,24 @@
|
|
|
9291
9341
|
"fqn": "aws-cdk-lib.aws_lambda.IFunction"
|
|
9292
9342
|
}
|
|
9293
9343
|
},
|
|
9344
|
+
{
|
|
9345
|
+
"abstract": true,
|
|
9346
|
+
"docs": {
|
|
9347
|
+
"remarks": "Independent of `basePath` above: that one is the URL prefix the REST API\nserves the app at (commonly the API Gateway stage), while this one is where\nthe objects live in the bucket. `_next/static` and public directory\nrequests are mapped to S3 keys directly, so they 404 unless this prefix is\napplied.",
|
|
9348
|
+
"stability": "stable",
|
|
9349
|
+
"summary": "S3 key prefix the static assets were uploaded under, i.e. `NextjsStaticAssets.keyPrefix`, which namespaces a shared bucket."
|
|
9350
|
+
},
|
|
9351
|
+
"immutable": true,
|
|
9352
|
+
"locationInModule": {
|
|
9353
|
+
"filename": "src/nextjs-api.ts",
|
|
9354
|
+
"line": 81
|
|
9355
|
+
},
|
|
9356
|
+
"name": "staticAssetsKeyPrefix",
|
|
9357
|
+
"optional": true,
|
|
9358
|
+
"type": {
|
|
9359
|
+
"primitive": "string"
|
|
9360
|
+
}
|
|
9361
|
+
},
|
|
9294
9362
|
{
|
|
9295
9363
|
"abstract": true,
|
|
9296
9364
|
"docs": {
|
|
@@ -9301,7 +9369,7 @@
|
|
|
9301
9369
|
"immutable": true,
|
|
9302
9370
|
"locationInModule": {
|
|
9303
9371
|
"filename": "src/nextjs-api.ts",
|
|
9304
|
-
"line":
|
|
9372
|
+
"line": 85
|
|
9305
9373
|
},
|
|
9306
9374
|
"name": "vpc",
|
|
9307
9375
|
"optional": true,
|
|
@@ -9327,7 +9395,7 @@
|
|
|
9327
9395
|
},
|
|
9328
9396
|
"locationInModule": {
|
|
9329
9397
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9330
|
-
"line":
|
|
9398
|
+
"line": 174
|
|
9331
9399
|
},
|
|
9332
9400
|
"parameters": [
|
|
9333
9401
|
{
|
|
@@ -9359,7 +9427,7 @@
|
|
|
9359
9427
|
"kind": "class",
|
|
9360
9428
|
"locationInModule": {
|
|
9361
9429
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9362
|
-
"line":
|
|
9430
|
+
"line": 153
|
|
9363
9431
|
},
|
|
9364
9432
|
"methods": [
|
|
9365
9433
|
{
|
|
@@ -9369,7 +9437,7 @@
|
|
|
9369
9437
|
},
|
|
9370
9438
|
"locationInModule": {
|
|
9371
9439
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9372
|
-
"line":
|
|
9440
|
+
"line": 250
|
|
9373
9441
|
},
|
|
9374
9442
|
"name": "computeBaseProps",
|
|
9375
9443
|
"protected": true,
|
|
@@ -9378,6 +9446,59 @@
|
|
|
9378
9446
|
"fqn": "cdk-nextjs.NextjsComputeBaseProps"
|
|
9379
9447
|
}
|
|
9380
9448
|
}
|
|
9449
|
+
},
|
|
9450
|
+
{
|
|
9451
|
+
"docs": {
|
|
9452
|
+
"stability": "stable",
|
|
9453
|
+
"summary": "Shared by `NextjsGlobalFunctions` and `NextjsRegionalFunctions`."
|
|
9454
|
+
},
|
|
9455
|
+
"locationInModule": {
|
|
9456
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9457
|
+
"line": 297
|
|
9458
|
+
},
|
|
9459
|
+
"name": "createNextjsFunctions",
|
|
9460
|
+
"parameters": [
|
|
9461
|
+
{
|
|
9462
|
+
"name": "overrides",
|
|
9463
|
+
"optional": true,
|
|
9464
|
+
"type": {
|
|
9465
|
+
"fqn": "cdk-nextjs.NextjsFunctionsOverrides"
|
|
9466
|
+
}
|
|
9467
|
+
}
|
|
9468
|
+
],
|
|
9469
|
+
"protected": true,
|
|
9470
|
+
"returns": {
|
|
9471
|
+
"type": {
|
|
9472
|
+
"fqn": "cdk-nextjs.NextjsFunctions"
|
|
9473
|
+
}
|
|
9474
|
+
}
|
|
9475
|
+
},
|
|
9476
|
+
{
|
|
9477
|
+
"docs": {
|
|
9478
|
+
"remarks": "Only called when the dedicated image optimization Lambda is\nenabled, which is what makes the missing-asset check below an invariant\nviolation rather than a supported configuration.",
|
|
9479
|
+
"stability": "stable",
|
|
9480
|
+
"summary": "Shared by `NextjsGlobalFunctions` and `NextjsRegionalFunctions`, the only two `NextjsType`s for which `NextjsBuild` produces an image optimization asset."
|
|
9481
|
+
},
|
|
9482
|
+
"locationInModule": {
|
|
9483
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9484
|
+
"line": 320
|
|
9485
|
+
},
|
|
9486
|
+
"name": "createNextjsImageFunction",
|
|
9487
|
+
"parameters": [
|
|
9488
|
+
{
|
|
9489
|
+
"name": "overrides",
|
|
9490
|
+
"optional": true,
|
|
9491
|
+
"type": {
|
|
9492
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionOverrides"
|
|
9493
|
+
}
|
|
9494
|
+
}
|
|
9495
|
+
],
|
|
9496
|
+
"protected": true,
|
|
9497
|
+
"returns": {
|
|
9498
|
+
"type": {
|
|
9499
|
+
"fqn": "cdk-nextjs.NextjsImageFunction"
|
|
9500
|
+
}
|
|
9501
|
+
}
|
|
9381
9502
|
}
|
|
9382
9503
|
],
|
|
9383
9504
|
"name": "NextjsBaseConstruct",
|
|
@@ -9389,7 +9510,7 @@
|
|
|
9389
9510
|
"immutable": true,
|
|
9390
9511
|
"locationInModule": {
|
|
9391
9512
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9392
|
-
"line":
|
|
9513
|
+
"line": 162
|
|
9393
9514
|
},
|
|
9394
9515
|
"name": "baseProps",
|
|
9395
9516
|
"protected": true,
|
|
@@ -9404,7 +9525,7 @@
|
|
|
9404
9525
|
"immutable": true,
|
|
9405
9526
|
"locationInModule": {
|
|
9406
9527
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9407
|
-
"line":
|
|
9528
|
+
"line": 160
|
|
9408
9529
|
},
|
|
9409
9530
|
"name": "nextjsType",
|
|
9410
9531
|
"protected": true,
|
|
@@ -9420,7 +9541,7 @@
|
|
|
9420
9541
|
"immutable": true,
|
|
9421
9542
|
"locationInModule": {
|
|
9422
9543
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9423
|
-
"line":
|
|
9544
|
+
"line": 158
|
|
9424
9545
|
},
|
|
9425
9546
|
"name": "url",
|
|
9426
9547
|
"type": {
|
|
@@ -9434,13 +9555,31 @@
|
|
|
9434
9555
|
"immutable": true,
|
|
9435
9556
|
"locationInModule": {
|
|
9436
9557
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9437
|
-
"line":
|
|
9558
|
+
"line": 165
|
|
9438
9559
|
},
|
|
9439
9560
|
"name": "constructOverrides",
|
|
9440
9561
|
"optional": true,
|
|
9441
9562
|
"protected": true,
|
|
9442
9563
|
"type": {
|
|
9443
|
-
"fqn": "cdk-nextjs.
|
|
9564
|
+
"fqn": "cdk-nextjs.NextjsFunctionsConstructOverrides"
|
|
9565
|
+
}
|
|
9566
|
+
},
|
|
9567
|
+
{
|
|
9568
|
+
"docs": {
|
|
9569
|
+
"remarks": "Normalized to a bare path segment, `undefined` for\nno `basePath`. Use this instead of `baseProps.basePath`.",
|
|
9570
|
+
"stability": "stable",
|
|
9571
|
+
"summary": "The `basePath` everything downstream is built from: the `basePath` prop when set, otherwise the app's own `basePath` for the `NextjsType`s where the two are necessarily the same."
|
|
9572
|
+
},
|
|
9573
|
+
"immutable": true,
|
|
9574
|
+
"locationInModule": {
|
|
9575
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9576
|
+
"line": 172
|
|
9577
|
+
},
|
|
9578
|
+
"name": "resolvedBasePath",
|
|
9579
|
+
"optional": true,
|
|
9580
|
+
"protected": true,
|
|
9581
|
+
"type": {
|
|
9582
|
+
"primitive": "string"
|
|
9444
9583
|
}
|
|
9445
9584
|
},
|
|
9446
9585
|
{
|
|
@@ -9449,7 +9588,7 @@
|
|
|
9449
9588
|
},
|
|
9450
9589
|
"locationInModule": {
|
|
9451
9590
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9452
|
-
"line":
|
|
9591
|
+
"line": 154
|
|
9453
9592
|
},
|
|
9454
9593
|
"name": "nextjsBuild",
|
|
9455
9594
|
"type": {
|
|
@@ -9462,7 +9601,7 @@
|
|
|
9462
9601
|
},
|
|
9463
9602
|
"locationInModule": {
|
|
9464
9603
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9465
|
-
"line":
|
|
9604
|
+
"line": 156
|
|
9466
9605
|
},
|
|
9467
9606
|
"name": "nextjsCache",
|
|
9468
9607
|
"type": {
|
|
@@ -9475,7 +9614,7 @@
|
|
|
9475
9614
|
},
|
|
9476
9615
|
"locationInModule": {
|
|
9477
9616
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9478
|
-
"line":
|
|
9617
|
+
"line": 155
|
|
9479
9618
|
},
|
|
9480
9619
|
"name": "nextjsStaticAssets",
|
|
9481
9620
|
"type": {
|
|
@@ -9496,7 +9635,7 @@
|
|
|
9496
9635
|
"kind": "interface",
|
|
9497
9636
|
"locationInModule": {
|
|
9498
9637
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9499
|
-
"line":
|
|
9638
|
+
"line": 31
|
|
9500
9639
|
},
|
|
9501
9640
|
"name": "NextjsBaseConstructOverrides",
|
|
9502
9641
|
"properties": [
|
|
@@ -9508,7 +9647,7 @@
|
|
|
9508
9647
|
"immutable": true,
|
|
9509
9648
|
"locationInModule": {
|
|
9510
9649
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9511
|
-
"line":
|
|
9650
|
+
"line": 32
|
|
9512
9651
|
},
|
|
9513
9652
|
"name": "nextjsBuildProps",
|
|
9514
9653
|
"optional": true,
|
|
@@ -9524,7 +9663,7 @@
|
|
|
9524
9663
|
"immutable": true,
|
|
9525
9664
|
"locationInModule": {
|
|
9526
9665
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9527
|
-
"line":
|
|
9666
|
+
"line": 33
|
|
9528
9667
|
},
|
|
9529
9668
|
"name": "nextjsCacheProps",
|
|
9530
9669
|
"optional": true,
|
|
@@ -9540,7 +9679,7 @@
|
|
|
9540
9679
|
"immutable": true,
|
|
9541
9680
|
"locationInModule": {
|
|
9542
9681
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9543
|
-
"line":
|
|
9682
|
+
"line": 34
|
|
9544
9683
|
},
|
|
9545
9684
|
"name": "nextjsStaticAssetsProps",
|
|
9546
9685
|
"optional": true,
|
|
@@ -9565,7 +9704,7 @@
|
|
|
9565
9704
|
"kind": "interface",
|
|
9566
9705
|
"locationInModule": {
|
|
9567
9706
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9568
|
-
"line":
|
|
9707
|
+
"line": 146
|
|
9569
9708
|
},
|
|
9570
9709
|
"name": "NextjsBaseConstructProps",
|
|
9571
9710
|
"properties": [
|
|
@@ -9577,7 +9716,7 @@
|
|
|
9577
9716
|
"immutable": true,
|
|
9578
9717
|
"locationInModule": {
|
|
9579
9718
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9580
|
-
"line":
|
|
9719
|
+
"line": 147
|
|
9581
9720
|
},
|
|
9582
9721
|
"name": "overrides",
|
|
9583
9722
|
"optional": true,
|
|
@@ -9599,7 +9738,7 @@
|
|
|
9599
9738
|
"kind": "interface",
|
|
9600
9739
|
"locationInModule": {
|
|
9601
9740
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9602
|
-
"line":
|
|
9741
|
+
"line": 50
|
|
9603
9742
|
},
|
|
9604
9743
|
"name": "NextjsBaseOverrides",
|
|
9605
9744
|
"properties": [
|
|
@@ -9611,7 +9750,7 @@
|
|
|
9611
9750
|
"immutable": true,
|
|
9612
9751
|
"locationInModule": {
|
|
9613
9752
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9614
|
-
"line":
|
|
9753
|
+
"line": 51
|
|
9615
9754
|
},
|
|
9616
9755
|
"name": "nextjsCache",
|
|
9617
9756
|
"optional": true,
|
|
@@ -9627,7 +9766,7 @@
|
|
|
9627
9766
|
"immutable": true,
|
|
9628
9767
|
"locationInModule": {
|
|
9629
9768
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9630
|
-
"line":
|
|
9769
|
+
"line": 52
|
|
9631
9770
|
},
|
|
9632
9771
|
"name": "nextjsStaticAssets",
|
|
9633
9772
|
"optional": true,
|
|
@@ -9648,7 +9787,7 @@
|
|
|
9648
9787
|
"kind": "interface",
|
|
9649
9788
|
"locationInModule": {
|
|
9650
9789
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9651
|
-
"line":
|
|
9790
|
+
"line": 55
|
|
9652
9791
|
},
|
|
9653
9792
|
"name": "NextjsBaseProps",
|
|
9654
9793
|
"properties": [
|
|
@@ -9662,7 +9801,7 @@
|
|
|
9662
9801
|
"immutable": true,
|
|
9663
9802
|
"locationInModule": {
|
|
9664
9803
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9665
|
-
"line":
|
|
9804
|
+
"line": 93
|
|
9666
9805
|
},
|
|
9667
9806
|
"name": "buildDirectory",
|
|
9668
9807
|
"type": {
|
|
@@ -9679,7 +9818,7 @@
|
|
|
9679
9818
|
"immutable": true,
|
|
9680
9819
|
"locationInModule": {
|
|
9681
9820
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9682
|
-
"line":
|
|
9821
|
+
"line": 111
|
|
9683
9822
|
},
|
|
9684
9823
|
"name": "healthCheckPath",
|
|
9685
9824
|
"type": {
|
|
@@ -9690,13 +9829,14 @@
|
|
|
9690
9829
|
"abstract": true,
|
|
9691
9830
|
"docs": {
|
|
9692
9831
|
"example": "\"/my-base-path\"",
|
|
9832
|
+
"remarks": "Also namespaces the\nstatic assets in S3, so it doubles as a way to host multiple apps or\nbranches out of one bucket.\n\nHow this relates to the `basePath` in your app's `next.config.js` depends\non the construct, and synth fails on a combination that can't serve the\napp:\n\n- `NextjsGlobalFunctions`/`NextjsGlobalContainers`: leave this unset and it\n follows your app's `basePath`, which is what you want — CloudFront serves\n static assets from S3 using the request path as the object key, so the two\n have to be identical and a mismatch 404s all of them. Setting a different\n value throws.\n- `NextjsRegionalFunctions`: if you set this, the app's `basePath` must end\n with it — either equal to it, or prefixed by the stage or base path\n mapping API Gateway strips before matching resources (`basePath:\n \"/prod/base\"` with this set to `\"/base\"`). Leaving it unset while the app\n sets one is correct and common — an app served at the default `prod` stage\n sets `basePath: \"/prod\"` and leaves this alone.\n- `NextjsRegionalContainers`: only namespaces the S3 bucket. The ALB sends\n every path to the container, which serves its own static assets, so this\n is unconstrained.",
|
|
9693
9833
|
"stability": "stable",
|
|
9694
9834
|
"summary": "Prefix to the URI path the app will be served at."
|
|
9695
9835
|
},
|
|
9696
9836
|
"immutable": true,
|
|
9697
9837
|
"locationInModule": {
|
|
9698
9838
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9699
|
-
"line":
|
|
9839
|
+
"line": 81
|
|
9700
9840
|
},
|
|
9701
9841
|
"name": "basePath",
|
|
9702
9842
|
"optional": true,
|
|
@@ -9714,7 +9854,7 @@
|
|
|
9714
9854
|
"immutable": true,
|
|
9715
9855
|
"locationInModule": {
|
|
9716
9856
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9717
|
-
"line":
|
|
9857
|
+
"line": 86
|
|
9718
9858
|
},
|
|
9719
9859
|
"name": "buildCommand",
|
|
9720
9860
|
"optional": true,
|
|
@@ -9732,7 +9872,7 @@
|
|
|
9732
9872
|
"immutable": true,
|
|
9733
9873
|
"locationInModule": {
|
|
9734
9874
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9735
|
-
"line":
|
|
9875
|
+
"line": 99
|
|
9736
9876
|
},
|
|
9737
9877
|
"name": "cacheBucket",
|
|
9738
9878
|
"optional": true,
|
|
@@ -9750,7 +9890,7 @@
|
|
|
9750
9890
|
"immutable": true,
|
|
9751
9891
|
"locationInModule": {
|
|
9752
9892
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9753
|
-
"line":
|
|
9893
|
+
"line": 119
|
|
9754
9894
|
},
|
|
9755
9895
|
"name": "revalidationTable",
|
|
9756
9896
|
"optional": true,
|
|
@@ -9769,7 +9909,7 @@
|
|
|
9769
9909
|
"immutable": true,
|
|
9770
9910
|
"locationInModule": {
|
|
9771
9911
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9772
|
-
"line":
|
|
9912
|
+
"line": 125
|
|
9773
9913
|
},
|
|
9774
9914
|
"name": "skipBuild",
|
|
9775
9915
|
"optional": true,
|
|
@@ -9787,7 +9927,7 @@
|
|
|
9787
9927
|
"immutable": true,
|
|
9788
9928
|
"locationInModule": {
|
|
9789
9929
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9790
|
-
"line":
|
|
9930
|
+
"line": 131
|
|
9791
9931
|
},
|
|
9792
9932
|
"name": "staticAssetsBucket",
|
|
9793
9933
|
"optional": true,
|
|
@@ -9805,7 +9945,7 @@
|
|
|
9805
9945
|
"immutable": true,
|
|
9806
9946
|
"locationInModule": {
|
|
9807
9947
|
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
9808
|
-
"line":
|
|
9948
|
+
"line": 139
|
|
9809
9949
|
},
|
|
9810
9950
|
"name": "vpc",
|
|
9811
9951
|
"optional": true,
|
|
@@ -9833,7 +9973,7 @@
|
|
|
9833
9973
|
},
|
|
9834
9974
|
"locationInModule": {
|
|
9835
9975
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9836
|
-
"line":
|
|
9976
|
+
"line": 108
|
|
9837
9977
|
},
|
|
9838
9978
|
"parameters": [
|
|
9839
9979
|
{
|
|
@@ -9859,7 +9999,7 @@
|
|
|
9859
9999
|
"kind": "class",
|
|
9860
10000
|
"locationInModule": {
|
|
9861
10001
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9862
|
-
"line":
|
|
10002
|
+
"line": 54
|
|
9863
10003
|
},
|
|
9864
10004
|
"name": "NextjsBuild",
|
|
9865
10005
|
"properties": [
|
|
@@ -9870,7 +10010,7 @@
|
|
|
9870
10010
|
},
|
|
9871
10011
|
"locationInModule": {
|
|
9872
10012
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9873
|
-
"line":
|
|
10013
|
+
"line": 59
|
|
9874
10014
|
},
|
|
9875
10015
|
"name": "buildId",
|
|
9876
10016
|
"type": {
|
|
@@ -9884,7 +10024,7 @@
|
|
|
9884
10024
|
},
|
|
9885
10025
|
"locationInModule": {
|
|
9886
10026
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9887
|
-
"line":
|
|
10027
|
+
"line": 87
|
|
9888
10028
|
},
|
|
9889
10029
|
"name": "dotNextPath",
|
|
9890
10030
|
"type": {
|
|
@@ -9899,13 +10039,27 @@
|
|
|
9899
10039
|
},
|
|
9900
10040
|
"locationInModule": {
|
|
9901
10041
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9902
|
-
"line":
|
|
10042
|
+
"line": 64
|
|
9903
10043
|
},
|
|
9904
10044
|
"name": "initCacheDir",
|
|
9905
10045
|
"type": {
|
|
9906
10046
|
"primitive": "string"
|
|
9907
10047
|
}
|
|
9908
10048
|
},
|
|
10049
|
+
{
|
|
10050
|
+
"docs": {
|
|
10051
|
+
"stability": "stable",
|
|
10052
|
+
"summary": "The Next.js app's own `basePath` — the URL prefix it generates its links and asset hrefs under — read out of the build's `required-server-files.json`. Normalized to a bare path segment, empty when the app sets none. Exposed so root constructs can reconcile it with the CDK `basePath` prop, which is a distinct thing; see `resolveBasePath`."
|
|
10053
|
+
},
|
|
10054
|
+
"locationInModule": {
|
|
10055
|
+
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
10056
|
+
"line": 95
|
|
10057
|
+
},
|
|
10058
|
+
"name": "nextConfigBasePath",
|
|
10059
|
+
"type": {
|
|
10060
|
+
"primitive": "string"
|
|
10061
|
+
}
|
|
10062
|
+
},
|
|
9909
10063
|
{
|
|
9910
10064
|
"docs": {
|
|
9911
10065
|
"example": "\"/Users/john/myapp/public\"",
|
|
@@ -9915,7 +10069,7 @@
|
|
|
9915
10069
|
},
|
|
9916
10070
|
"locationInModule": {
|
|
9917
10071
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9918
|
-
"line":
|
|
10072
|
+
"line": 69
|
|
9919
10073
|
},
|
|
9920
10074
|
"name": "publicDirEntries",
|
|
9921
10075
|
"type": {
|
|
@@ -9935,7 +10089,7 @@
|
|
|
9935
10089
|
},
|
|
9936
10090
|
"locationInModule": {
|
|
9937
10091
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9938
|
-
"line":
|
|
10092
|
+
"line": 76
|
|
9939
10093
|
},
|
|
9940
10094
|
"name": "relativePathToEntrypoint",
|
|
9941
10095
|
"type": {
|
|
@@ -9950,12 +10104,27 @@
|
|
|
9950
10104
|
},
|
|
9951
10105
|
"locationInModule": {
|
|
9952
10106
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9953
|
-
"line":
|
|
10107
|
+
"line": 83
|
|
9954
10108
|
},
|
|
9955
10109
|
"name": "relativePathToPackage",
|
|
9956
10110
|
"type": {
|
|
9957
10111
|
"primitive": "string"
|
|
9958
10112
|
}
|
|
10113
|
+
},
|
|
10114
|
+
{
|
|
10115
|
+
"docs": {
|
|
10116
|
+
"stability": "stable",
|
|
10117
|
+
"summary": "Absolute path to the directory prepared for the image optimization Lambda asset: bundled handler, glibc `sharp` binaries, and `required-server-files.json`. Only set for {@link NextjsType.GLOBAL_FUNCTIONS} and {@link NextjsType.REGIONAL_FUNCTIONS}, and only when the dedicated image optimization Lambda is enabled."
|
|
10118
|
+
},
|
|
10119
|
+
"locationInModule": {
|
|
10120
|
+
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
10121
|
+
"line": 103
|
|
10122
|
+
},
|
|
10123
|
+
"name": "imageOptimizationAssetPath",
|
|
10124
|
+
"optional": true,
|
|
10125
|
+
"type": {
|
|
10126
|
+
"primitive": "string"
|
|
10127
|
+
}
|
|
9959
10128
|
}
|
|
9960
10129
|
],
|
|
9961
10130
|
"symbolId": "src/nextjs-build/nextjs-build:NextjsBuild"
|
|
@@ -9970,7 +10139,7 @@
|
|
|
9970
10139
|
"kind": "interface",
|
|
9971
10140
|
"locationInModule": {
|
|
9972
10141
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9973
|
-
"line":
|
|
10142
|
+
"line": 28
|
|
9974
10143
|
},
|
|
9975
10144
|
"name": "NextjsBuildProps",
|
|
9976
10145
|
"properties": [
|
|
@@ -9983,7 +10152,7 @@
|
|
|
9983
10152
|
"immutable": true,
|
|
9984
10153
|
"locationInModule": {
|
|
9985
10154
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
9986
|
-
"line":
|
|
10155
|
+
"line": 37
|
|
9987
10156
|
},
|
|
9988
10157
|
"name": "buildDirectory",
|
|
9989
10158
|
"type": {
|
|
@@ -9998,7 +10167,7 @@
|
|
|
9998
10167
|
"immutable": true,
|
|
9999
10168
|
"locationInModule": {
|
|
10000
10169
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
10001
|
-
"line":
|
|
10170
|
+
"line": 38
|
|
10002
10171
|
},
|
|
10003
10172
|
"name": "nextjsType",
|
|
10004
10173
|
"type": {
|
|
@@ -10014,7 +10183,7 @@
|
|
|
10014
10183
|
"immutable": true,
|
|
10015
10184
|
"locationInModule": {
|
|
10016
10185
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
10017
|
-
"line":
|
|
10186
|
+
"line": 32
|
|
10018
10187
|
},
|
|
10019
10188
|
"name": "buildCommand",
|
|
10020
10189
|
"optional": true,
|
|
@@ -10031,7 +10200,7 @@
|
|
|
10031
10200
|
"immutable": true,
|
|
10032
10201
|
"locationInModule": {
|
|
10033
10202
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
10034
|
-
"line":
|
|
10203
|
+
"line": 42
|
|
10035
10204
|
},
|
|
10036
10205
|
"name": "skipBuild",
|
|
10037
10206
|
"optional": true,
|
|
@@ -10734,7 +10903,7 @@
|
|
|
10734
10903
|
},
|
|
10735
10904
|
"locationInModule": {
|
|
10736
10905
|
"filename": "src/nextjs-distribution.ts",
|
|
10737
|
-
"line":
|
|
10906
|
+
"line": 152
|
|
10738
10907
|
},
|
|
10739
10908
|
"parameters": [
|
|
10740
10909
|
{
|
|
@@ -10760,7 +10929,7 @@
|
|
|
10760
10929
|
"kind": "class",
|
|
10761
10930
|
"locationInModule": {
|
|
10762
10931
|
"filename": "src/nextjs-distribution.ts",
|
|
10763
|
-
"line":
|
|
10932
|
+
"line": 108
|
|
10764
10933
|
},
|
|
10765
10934
|
"name": "NextjsDistribution",
|
|
10766
10935
|
"properties": [
|
|
@@ -10770,7 +10939,7 @@
|
|
|
10770
10939
|
},
|
|
10771
10940
|
"locationInModule": {
|
|
10772
10941
|
"filename": "src/nextjs-distribution.ts",
|
|
10773
|
-
"line":
|
|
10942
|
+
"line": 109
|
|
10774
10943
|
},
|
|
10775
10944
|
"name": "distribution",
|
|
10776
10945
|
"type": {
|
|
@@ -10790,7 +10959,7 @@
|
|
|
10790
10959
|
"kind": "interface",
|
|
10791
10960
|
"locationInModule": {
|
|
10792
10961
|
"filename": "src/nextjs-distribution.ts",
|
|
10793
|
-
"line":
|
|
10962
|
+
"line": 48
|
|
10794
10963
|
},
|
|
10795
10964
|
"name": "NextjsDistributionOverrides",
|
|
10796
10965
|
"properties": [
|
|
@@ -10802,7 +10971,7 @@
|
|
|
10802
10971
|
"immutable": true,
|
|
10803
10972
|
"locationInModule": {
|
|
10804
10973
|
"filename": "src/nextjs-distribution.ts",
|
|
10805
|
-
"line":
|
|
10974
|
+
"line": 49
|
|
10806
10975
|
},
|
|
10807
10976
|
"name": "distributionProps",
|
|
10808
10977
|
"optional": true,
|
|
@@ -10818,7 +10987,7 @@
|
|
|
10818
10987
|
"immutable": true,
|
|
10819
10988
|
"locationInModule": {
|
|
10820
10989
|
"filename": "src/nextjs-distribution.ts",
|
|
10821
|
-
"line":
|
|
10990
|
+
"line": 53
|
|
10822
10991
|
},
|
|
10823
10992
|
"name": "dynamicBehaviorOptions",
|
|
10824
10993
|
"optional": true,
|
|
@@ -10834,7 +11003,7 @@
|
|
|
10834
11003
|
"immutable": true,
|
|
10835
11004
|
"locationInModule": {
|
|
10836
11005
|
"filename": "src/nextjs-distribution.ts",
|
|
10837
|
-
"line":
|
|
11006
|
+
"line": 54
|
|
10838
11007
|
},
|
|
10839
11008
|
"name": "dynamicCachePolicyProps",
|
|
10840
11009
|
"optional": true,
|
|
@@ -10850,7 +11019,7 @@
|
|
|
10850
11019
|
"immutable": true,
|
|
10851
11020
|
"locationInModule": {
|
|
10852
11021
|
"filename": "src/nextjs-distribution.ts",
|
|
10853
|
-
"line":
|
|
11022
|
+
"line": 56
|
|
10854
11023
|
},
|
|
10855
11024
|
"name": "dynamicFunctionUrlOriginWithOACProps",
|
|
10856
11025
|
"optional": true,
|
|
@@ -10866,7 +11035,7 @@
|
|
|
10866
11035
|
"immutable": true,
|
|
10867
11036
|
"locationInModule": {
|
|
10868
11037
|
"filename": "src/nextjs-distribution.ts",
|
|
10869
|
-
"line":
|
|
11038
|
+
"line": 55
|
|
10870
11039
|
},
|
|
10871
11040
|
"name": "dynamicResponseHeadersPolicyProps",
|
|
10872
11041
|
"optional": true,
|
|
@@ -10882,7 +11051,7 @@
|
|
|
10882
11051
|
"immutable": true,
|
|
10883
11052
|
"locationInModule": {
|
|
10884
11053
|
"filename": "src/nextjs-distribution.ts",
|
|
10885
|
-
"line":
|
|
11054
|
+
"line": 57
|
|
10886
11055
|
},
|
|
10887
11056
|
"name": "dynamicVpcOriginWithEndpointProps",
|
|
10888
11057
|
"optional": true,
|
|
@@ -10898,7 +11067,7 @@
|
|
|
10898
11067
|
"immutable": true,
|
|
10899
11068
|
"locationInModule": {
|
|
10900
11069
|
"filename": "src/nextjs-distribution.ts",
|
|
10901
|
-
"line":
|
|
11070
|
+
"line": 50
|
|
10902
11071
|
},
|
|
10903
11072
|
"name": "imageBehaviorOptions",
|
|
10904
11073
|
"optional": true,
|
|
@@ -10914,7 +11083,7 @@
|
|
|
10914
11083
|
"immutable": true,
|
|
10915
11084
|
"locationInModule": {
|
|
10916
11085
|
"filename": "src/nextjs-distribution.ts",
|
|
10917
|
-
"line":
|
|
11086
|
+
"line": 51
|
|
10918
11087
|
},
|
|
10919
11088
|
"name": "imageCachePolicyProps",
|
|
10920
11089
|
"optional": true,
|
|
@@ -10930,7 +11099,23 @@
|
|
|
10930
11099
|
"immutable": true,
|
|
10931
11100
|
"locationInModule": {
|
|
10932
11101
|
"filename": "src/nextjs-distribution.ts",
|
|
10933
|
-
"line":
|
|
11102
|
+
"line": 58
|
|
11103
|
+
},
|
|
11104
|
+
"name": "imageFunctionUrlOriginWithOACProps",
|
|
11105
|
+
"optional": true,
|
|
11106
|
+
"type": {
|
|
11107
|
+
"fqn": "aws-cdk-lib.aws_cloudfront_origins.FunctionUrlOriginWithOACProps"
|
|
11108
|
+
}
|
|
11109
|
+
},
|
|
11110
|
+
{
|
|
11111
|
+
"abstract": true,
|
|
11112
|
+
"docs": {
|
|
11113
|
+
"stability": "stable"
|
|
11114
|
+
},
|
|
11115
|
+
"immutable": true,
|
|
11116
|
+
"locationInModule": {
|
|
11117
|
+
"filename": "src/nextjs-distribution.ts",
|
|
11118
|
+
"line": 52
|
|
10934
11119
|
},
|
|
10935
11120
|
"name": "imageResponseHeadersPolicyProps",
|
|
10936
11121
|
"optional": true,
|
|
@@ -10946,7 +11131,7 @@
|
|
|
10946
11131
|
"immutable": true,
|
|
10947
11132
|
"locationInModule": {
|
|
10948
11133
|
"filename": "src/nextjs-distribution.ts",
|
|
10949
|
-
"line":
|
|
11134
|
+
"line": 61
|
|
10950
11135
|
},
|
|
10951
11136
|
"name": "s3BucketOriginProps",
|
|
10952
11137
|
"optional": true,
|
|
@@ -10962,7 +11147,7 @@
|
|
|
10962
11147
|
"immutable": true,
|
|
10963
11148
|
"locationInModule": {
|
|
10964
11149
|
"filename": "src/nextjs-distribution.ts",
|
|
10965
|
-
"line":
|
|
11150
|
+
"line": 59
|
|
10966
11151
|
},
|
|
10967
11152
|
"name": "staticBehaviorOptions",
|
|
10968
11153
|
"optional": true,
|
|
@@ -10978,7 +11163,7 @@
|
|
|
10978
11163
|
"immutable": true,
|
|
10979
11164
|
"locationInModule": {
|
|
10980
11165
|
"filename": "src/nextjs-distribution.ts",
|
|
10981
|
-
"line":
|
|
11166
|
+
"line": 60
|
|
10982
11167
|
},
|
|
10983
11168
|
"name": "staticResponseHeadersPolicyProps",
|
|
10984
11169
|
"optional": true,
|
|
@@ -10999,7 +11184,7 @@
|
|
|
10999
11184
|
"kind": "interface",
|
|
11000
11185
|
"locationInModule": {
|
|
11001
11186
|
"filename": "src/nextjs-distribution.ts",
|
|
11002
|
-
"line":
|
|
11187
|
+
"line": 64
|
|
11003
11188
|
},
|
|
11004
11189
|
"name": "NextjsDistributionProps",
|
|
11005
11190
|
"properties": [
|
|
@@ -11013,7 +11198,7 @@
|
|
|
11013
11198
|
"immutable": true,
|
|
11014
11199
|
"locationInModule": {
|
|
11015
11200
|
"filename": "src/nextjs-distribution.ts",
|
|
11016
|
-
"line":
|
|
11201
|
+
"line": 69
|
|
11017
11202
|
},
|
|
11018
11203
|
"name": "assetsBucket",
|
|
11019
11204
|
"type": {
|
|
@@ -11028,7 +11213,7 @@
|
|
|
11028
11213
|
"immutable": true,
|
|
11029
11214
|
"locationInModule": {
|
|
11030
11215
|
"filename": "src/nextjs-distribution.ts",
|
|
11031
|
-
"line":
|
|
11216
|
+
"line": 96
|
|
11032
11217
|
},
|
|
11033
11218
|
"name": "nextjsType",
|
|
11034
11219
|
"type": {
|
|
@@ -11044,7 +11229,7 @@
|
|
|
11044
11229
|
"immutable": true,
|
|
11045
11230
|
"locationInModule": {
|
|
11046
11231
|
"filename": "src/nextjs-distribution.ts",
|
|
11047
|
-
"line":
|
|
11232
|
+
"line": 105
|
|
11048
11233
|
},
|
|
11049
11234
|
"name": "publicDirEntries",
|
|
11050
11235
|
"type": {
|
|
@@ -11059,12 +11244,14 @@
|
|
|
11059
11244
|
{
|
|
11060
11245
|
"abstract": true,
|
|
11061
11246
|
"docs": {
|
|
11062
|
-
"
|
|
11247
|
+
"remarks": "Surrounding slashes are normalized\naway, so \"/base\", \"base\" and \"/base/\" all produce the same cache behaviors.",
|
|
11248
|
+
"stability": "stable",
|
|
11249
|
+
"summary": "URI path prefix the app is served at."
|
|
11063
11250
|
},
|
|
11064
11251
|
"immutable": true,
|
|
11065
11252
|
"locationInModule": {
|
|
11066
11253
|
"filename": "src/nextjs-distribution.ts",
|
|
11067
|
-
"line":
|
|
11254
|
+
"line": 74
|
|
11068
11255
|
},
|
|
11069
11256
|
"name": "basePath",
|
|
11070
11257
|
"optional": true,
|
|
@@ -11081,7 +11268,7 @@
|
|
|
11081
11268
|
"immutable": true,
|
|
11082
11269
|
"locationInModule": {
|
|
11083
11270
|
"filename": "src/nextjs-distribution.ts",
|
|
11084
|
-
"line":
|
|
11271
|
+
"line": 78
|
|
11085
11272
|
},
|
|
11086
11273
|
"name": "certificate",
|
|
11087
11274
|
"optional": true,
|
|
@@ -11097,7 +11284,7 @@
|
|
|
11097
11284
|
"immutable": true,
|
|
11098
11285
|
"locationInModule": {
|
|
11099
11286
|
"filename": "src/nextjs-distribution.ts",
|
|
11100
|
-
"line":
|
|
11287
|
+
"line": 79
|
|
11101
11288
|
},
|
|
11102
11289
|
"name": "distribution",
|
|
11103
11290
|
"optional": true,
|
|
@@ -11114,7 +11301,7 @@
|
|
|
11114
11301
|
"immutable": true,
|
|
11115
11302
|
"locationInModule": {
|
|
11116
11303
|
"filename": "src/nextjs-distribution.ts",
|
|
11117
|
-
"line":
|
|
11304
|
+
"line": 83
|
|
11118
11305
|
},
|
|
11119
11306
|
"name": "functionUrl",
|
|
11120
11307
|
"optional": true,
|
|
@@ -11122,6 +11309,24 @@
|
|
|
11122
11309
|
"fqn": "aws-cdk-lib.aws_lambda.IFunctionUrl"
|
|
11123
11310
|
}
|
|
11124
11311
|
},
|
|
11312
|
+
{
|
|
11313
|
+
"abstract": true,
|
|
11314
|
+
"docs": {
|
|
11315
|
+
"remarks": "Only applicable\nto `NextjsType.GLOBAL_FUNCTIONS`, and only when the dedicated image\nfunction is enabled. When omitted, the `_next/image*` behavior points at\nthe dynamic origin, which serves image optimization from the Next.js\nserver itself.",
|
|
11316
|
+
"stability": "stable",
|
|
11317
|
+
"summary": "Function URL of the dedicated image optimization Lambda."
|
|
11318
|
+
},
|
|
11319
|
+
"immutable": true,
|
|
11320
|
+
"locationInModule": {
|
|
11321
|
+
"filename": "src/nextjs-distribution.ts",
|
|
11322
|
+
"line": 91
|
|
11323
|
+
},
|
|
11324
|
+
"name": "imageFunctionUrl",
|
|
11325
|
+
"optional": true,
|
|
11326
|
+
"type": {
|
|
11327
|
+
"fqn": "aws-cdk-lib.aws_lambda.IFunctionUrl"
|
|
11328
|
+
}
|
|
11329
|
+
},
|
|
11125
11330
|
{
|
|
11126
11331
|
"abstract": true,
|
|
11127
11332
|
"docs": {
|
|
@@ -11131,7 +11336,7 @@
|
|
|
11131
11336
|
"immutable": true,
|
|
11132
11337
|
"locationInModule": {
|
|
11133
11338
|
"filename": "src/nextjs-distribution.ts",
|
|
11134
|
-
"line":
|
|
11339
|
+
"line": 95
|
|
11135
11340
|
},
|
|
11136
11341
|
"name": "loadBalancer",
|
|
11137
11342
|
"optional": true,
|
|
@@ -11148,7 +11353,7 @@
|
|
|
11148
11353
|
"immutable": true,
|
|
11149
11354
|
"locationInModule": {
|
|
11150
11355
|
"filename": "src/nextjs-distribution.ts",
|
|
11151
|
-
"line":
|
|
11356
|
+
"line": 100
|
|
11152
11357
|
},
|
|
11153
11358
|
"name": "overrides",
|
|
11154
11359
|
"optional": true,
|
|
@@ -11233,6 +11438,60 @@
|
|
|
11233
11438
|
],
|
|
11234
11439
|
"symbolId": "src/nextjs-compute/nextjs-functions:NextjsFunctions"
|
|
11235
11440
|
},
|
|
11441
|
+
"cdk-nextjs.NextjsFunctionsConstructOverrides": {
|
|
11442
|
+
"assembly": "cdk-nextjs",
|
|
11443
|
+
"datatype": true,
|
|
11444
|
+
"docs": {
|
|
11445
|
+
"remarks": "The\nContainers types serve `_next/image` from the standalone server itself and\nhave no Lambda functions to configure, so they would silently ignore these.",
|
|
11446
|
+
"stability": "stable",
|
|
11447
|
+
"summary": "Adds the overrides that only apply to the two Functions `NextjsType`s."
|
|
11448
|
+
},
|
|
11449
|
+
"fqn": "cdk-nextjs.NextjsFunctionsConstructOverrides",
|
|
11450
|
+
"interfaces": [
|
|
11451
|
+
"cdk-nextjs.NextjsBaseConstructOverrides"
|
|
11452
|
+
],
|
|
11453
|
+
"kind": "interface",
|
|
11454
|
+
"locationInModule": {
|
|
11455
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
11456
|
+
"line": 42
|
|
11457
|
+
},
|
|
11458
|
+
"name": "NextjsFunctionsConstructOverrides",
|
|
11459
|
+
"properties": [
|
|
11460
|
+
{
|
|
11461
|
+
"abstract": true,
|
|
11462
|
+
"docs": {
|
|
11463
|
+
"stability": "stable"
|
|
11464
|
+
},
|
|
11465
|
+
"immutable": true,
|
|
11466
|
+
"locationInModule": {
|
|
11467
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
11468
|
+
"line": 43
|
|
11469
|
+
},
|
|
11470
|
+
"name": "nextjsFunctionsProps",
|
|
11471
|
+
"optional": true,
|
|
11472
|
+
"type": {
|
|
11473
|
+
"fqn": "cdk-nextjs.NextjsFunctionsProps"
|
|
11474
|
+
}
|
|
11475
|
+
},
|
|
11476
|
+
{
|
|
11477
|
+
"abstract": true,
|
|
11478
|
+
"docs": {
|
|
11479
|
+
"stability": "stable"
|
|
11480
|
+
},
|
|
11481
|
+
"immutable": true,
|
|
11482
|
+
"locationInModule": {
|
|
11483
|
+
"filename": "src/root-constructs/nextjs-base-construct.ts",
|
|
11484
|
+
"line": 44
|
|
11485
|
+
},
|
|
11486
|
+
"name": "nextjsImageFunctionProps",
|
|
11487
|
+
"optional": true,
|
|
11488
|
+
"type": {
|
|
11489
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionProps"
|
|
11490
|
+
}
|
|
11491
|
+
}
|
|
11492
|
+
],
|
|
11493
|
+
"symbolId": "src/root-constructs/nextjs-base-construct:NextjsFunctionsConstructOverrides"
|
|
11494
|
+
},
|
|
11236
11495
|
"cdk-nextjs.NextjsFunctionsOverrides": {
|
|
11237
11496
|
"assembly": "cdk-nextjs",
|
|
11238
11497
|
"datatype": true,
|
|
@@ -11348,7 +11607,7 @@
|
|
|
11348
11607
|
},
|
|
11349
11608
|
"locationInModule": {
|
|
11350
11609
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11351
|
-
"line":
|
|
11610
|
+
"line": 98
|
|
11352
11611
|
},
|
|
11353
11612
|
"parameters": [
|
|
11354
11613
|
{
|
|
@@ -11374,18 +11633,19 @@
|
|
|
11374
11633
|
"kind": "class",
|
|
11375
11634
|
"locationInModule": {
|
|
11376
11635
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11377
|
-
"line":
|
|
11636
|
+
"line": 80
|
|
11378
11637
|
},
|
|
11379
11638
|
"name": "NextjsGlobalContainers",
|
|
11380
11639
|
"properties": [
|
|
11381
11640
|
{
|
|
11382
11641
|
"docs": {
|
|
11383
|
-
"stability": "stable"
|
|
11642
|
+
"stability": "stable",
|
|
11643
|
+
"summary": "Public URL of the app, including `basePath` — the app only answers under that prefix, and it's derived from the app's own `basePath` when the prop is left unset, so it's there whether or not you asked for it."
|
|
11384
11644
|
},
|
|
11385
11645
|
"immutable": true,
|
|
11386
11646
|
"locationInModule": {
|
|
11387
11647
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11388
|
-
"line":
|
|
11648
|
+
"line": 89
|
|
11389
11649
|
},
|
|
11390
11650
|
"name": "url",
|
|
11391
11651
|
"overrides": "cdk-nextjs.NextjsBaseConstruct",
|
|
@@ -11399,7 +11659,7 @@
|
|
|
11399
11659
|
},
|
|
11400
11660
|
"locationInModule": {
|
|
11401
11661
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11402
|
-
"line":
|
|
11662
|
+
"line": 81
|
|
11403
11663
|
},
|
|
11404
11664
|
"name": "nextjsContainers",
|
|
11405
11665
|
"type": {
|
|
@@ -11412,7 +11672,7 @@
|
|
|
11412
11672
|
},
|
|
11413
11673
|
"locationInModule": {
|
|
11414
11674
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11415
|
-
"line":
|
|
11675
|
+
"line": 82
|
|
11416
11676
|
},
|
|
11417
11677
|
"name": "nextjsDistribution",
|
|
11418
11678
|
"type": {
|
|
@@ -11425,7 +11685,7 @@
|
|
|
11425
11685
|
},
|
|
11426
11686
|
"locationInModule": {
|
|
11427
11687
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11428
|
-
"line":
|
|
11688
|
+
"line": 83
|
|
11429
11689
|
},
|
|
11430
11690
|
"name": "nextjsPostDeploy",
|
|
11431
11691
|
"type": {
|
|
@@ -11448,7 +11708,7 @@
|
|
|
11448
11708
|
"kind": "interface",
|
|
11449
11709
|
"locationInModule": {
|
|
11450
11710
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11451
|
-
"line":
|
|
11711
|
+
"line": 32
|
|
11452
11712
|
},
|
|
11453
11713
|
"name": "NextjsGlobalContainersConstructOverrides",
|
|
11454
11714
|
"properties": [
|
|
@@ -11460,7 +11720,7 @@
|
|
|
11460
11720
|
"immutable": true,
|
|
11461
11721
|
"locationInModule": {
|
|
11462
11722
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11463
|
-
"line":
|
|
11723
|
+
"line": 33
|
|
11464
11724
|
},
|
|
11465
11725
|
"name": "nextjsContainersProps",
|
|
11466
11726
|
"optional": true,
|
|
@@ -11476,7 +11736,7 @@
|
|
|
11476
11736
|
"immutable": true,
|
|
11477
11737
|
"locationInModule": {
|
|
11478
11738
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11479
|
-
"line":
|
|
11739
|
+
"line": 34
|
|
11480
11740
|
},
|
|
11481
11741
|
"name": "nextjsDistributionProps",
|
|
11482
11742
|
"optional": true,
|
|
@@ -11492,7 +11752,7 @@
|
|
|
11492
11752
|
"immutable": true,
|
|
11493
11753
|
"locationInModule": {
|
|
11494
11754
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11495
|
-
"line":
|
|
11755
|
+
"line": 35
|
|
11496
11756
|
},
|
|
11497
11757
|
"name": "nextjsPostDeployProps",
|
|
11498
11758
|
"optional": true,
|
|
@@ -11518,7 +11778,7 @@
|
|
|
11518
11778
|
"kind": "interface",
|
|
11519
11779
|
"locationInModule": {
|
|
11520
11780
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11521
|
-
"line":
|
|
11781
|
+
"line": 43
|
|
11522
11782
|
},
|
|
11523
11783
|
"name": "NextjsGlobalContainersOverrides",
|
|
11524
11784
|
"properties": [
|
|
@@ -11530,7 +11790,7 @@
|
|
|
11530
11790
|
"immutable": true,
|
|
11531
11791
|
"locationInModule": {
|
|
11532
11792
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11533
|
-
"line":
|
|
11793
|
+
"line": 45
|
|
11534
11794
|
},
|
|
11535
11795
|
"name": "nextjsContainers",
|
|
11536
11796
|
"optional": true,
|
|
@@ -11546,7 +11806,7 @@
|
|
|
11546
11806
|
"immutable": true,
|
|
11547
11807
|
"locationInModule": {
|
|
11548
11808
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11549
|
-
"line":
|
|
11809
|
+
"line": 46
|
|
11550
11810
|
},
|
|
11551
11811
|
"name": "nextjsDistribution",
|
|
11552
11812
|
"optional": true,
|
|
@@ -11562,7 +11822,7 @@
|
|
|
11562
11822
|
"immutable": true,
|
|
11563
11823
|
"locationInModule": {
|
|
11564
11824
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11565
|
-
"line":
|
|
11825
|
+
"line": 44
|
|
11566
11826
|
},
|
|
11567
11827
|
"name": "nextjsGlobalContainers",
|
|
11568
11828
|
"optional": true,
|
|
@@ -11578,7 +11838,7 @@
|
|
|
11578
11838
|
"immutable": true,
|
|
11579
11839
|
"locationInModule": {
|
|
11580
11840
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11581
|
-
"line":
|
|
11841
|
+
"line": 47
|
|
11582
11842
|
},
|
|
11583
11843
|
"name": "nextjsPostDeploy",
|
|
11584
11844
|
"optional": true,
|
|
@@ -11602,7 +11862,7 @@
|
|
|
11602
11862
|
"kind": "interface",
|
|
11603
11863
|
"locationInModule": {
|
|
11604
11864
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11605
|
-
"line":
|
|
11865
|
+
"line": 50
|
|
11606
11866
|
},
|
|
11607
11867
|
"name": "NextjsGlobalContainersProps",
|
|
11608
11868
|
"properties": [
|
|
@@ -11616,7 +11876,7 @@
|
|
|
11616
11876
|
"immutable": true,
|
|
11617
11877
|
"locationInModule": {
|
|
11618
11878
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11619
|
-
"line":
|
|
11879
|
+
"line": 57
|
|
11620
11880
|
},
|
|
11621
11881
|
"name": "alb",
|
|
11622
11882
|
"optional": true,
|
|
@@ -11634,7 +11894,7 @@
|
|
|
11634
11894
|
"immutable": true,
|
|
11635
11895
|
"locationInModule": {
|
|
11636
11896
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11637
|
-
"line":
|
|
11897
|
+
"line": 62
|
|
11638
11898
|
},
|
|
11639
11899
|
"name": "distribution",
|
|
11640
11900
|
"optional": true,
|
|
@@ -11652,7 +11912,7 @@
|
|
|
11652
11912
|
"immutable": true,
|
|
11653
11913
|
"locationInModule": {
|
|
11654
11914
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11655
|
-
"line":
|
|
11915
|
+
"line": 67
|
|
11656
11916
|
},
|
|
11657
11917
|
"name": "ecsCluster",
|
|
11658
11918
|
"optional": true,
|
|
@@ -11669,7 +11929,7 @@
|
|
|
11669
11929
|
"immutable": true,
|
|
11670
11930
|
"locationInModule": {
|
|
11671
11931
|
"filename": "src/root-constructs/nextjs-global-containers.ts",
|
|
11672
|
-
"line":
|
|
11932
|
+
"line": 71
|
|
11673
11933
|
},
|
|
11674
11934
|
"name": "overrides",
|
|
11675
11935
|
"optional": true,
|
|
@@ -11694,7 +11954,7 @@
|
|
|
11694
11954
|
},
|
|
11695
11955
|
"locationInModule": {
|
|
11696
11956
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11697
|
-
"line":
|
|
11957
|
+
"line": 94
|
|
11698
11958
|
},
|
|
11699
11959
|
"parameters": [
|
|
11700
11960
|
{
|
|
@@ -11720,18 +11980,19 @@
|
|
|
11720
11980
|
"kind": "class",
|
|
11721
11981
|
"locationInModule": {
|
|
11722
11982
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11723
|
-
"line":
|
|
11983
|
+
"line": 70
|
|
11724
11984
|
},
|
|
11725
11985
|
"name": "NextjsGlobalFunctions",
|
|
11726
11986
|
"properties": [
|
|
11727
11987
|
{
|
|
11728
11988
|
"docs": {
|
|
11729
|
-
"stability": "stable"
|
|
11989
|
+
"stability": "stable",
|
|
11990
|
+
"summary": "Public URL of the app, including `basePath` — the app only answers under that prefix, and it's derived from the app's own `basePath` when the prop is left unset, so it's there whether or not you asked for it."
|
|
11730
11991
|
},
|
|
11731
11992
|
"immutable": true,
|
|
11732
11993
|
"locationInModule": {
|
|
11733
11994
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11734
|
-
"line":
|
|
11995
|
+
"line": 85
|
|
11735
11996
|
},
|
|
11736
11997
|
"name": "url",
|
|
11737
11998
|
"overrides": "cdk-nextjs.NextjsBaseConstruct",
|
|
@@ -11745,7 +12006,7 @@
|
|
|
11745
12006
|
},
|
|
11746
12007
|
"locationInModule": {
|
|
11747
12008
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11748
|
-
"line":
|
|
12009
|
+
"line": 78
|
|
11749
12010
|
},
|
|
11750
12011
|
"name": "nextjsDistribution",
|
|
11751
12012
|
"type": {
|
|
@@ -11758,7 +12019,7 @@
|
|
|
11758
12019
|
},
|
|
11759
12020
|
"locationInModule": {
|
|
11760
12021
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11761
|
-
"line":
|
|
12022
|
+
"line": 71
|
|
11762
12023
|
},
|
|
11763
12024
|
"name": "nextjsFunctions",
|
|
11764
12025
|
"type": {
|
|
@@ -11771,12 +12032,28 @@
|
|
|
11771
12032
|
},
|
|
11772
12033
|
"locationInModule": {
|
|
11773
12034
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11774
|
-
"line":
|
|
12035
|
+
"line": 79
|
|
11775
12036
|
},
|
|
11776
12037
|
"name": "nextjsPostDeploy",
|
|
11777
12038
|
"type": {
|
|
11778
12039
|
"fqn": "cdk-nextjs.NextjsPostDeploy"
|
|
11779
12040
|
}
|
|
12041
|
+
},
|
|
12042
|
+
{
|
|
12043
|
+
"docs": {
|
|
12044
|
+
"remarks": "`_next/image` is otherwise served by\n{@link nextjsFunctions}.",
|
|
12045
|
+
"stability": "stable",
|
|
12046
|
+
"summary": "Only created when the (experimental, unsupported) dedicated image optimization Lambda is enabled."
|
|
12047
|
+
},
|
|
12048
|
+
"locationInModule": {
|
|
12049
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12050
|
+
"line": 77
|
|
12051
|
+
},
|
|
12052
|
+
"name": "nextjsImageFunction",
|
|
12053
|
+
"optional": true,
|
|
12054
|
+
"type": {
|
|
12055
|
+
"fqn": "cdk-nextjs.NextjsImageFunction"
|
|
12056
|
+
}
|
|
11780
12057
|
}
|
|
11781
12058
|
],
|
|
11782
12059
|
"symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctions"
|
|
@@ -11789,12 +12066,12 @@
|
|
|
11789
12066
|
},
|
|
11790
12067
|
"fqn": "cdk-nextjs.NextjsGlobalFunctionsConstructOverrides",
|
|
11791
12068
|
"interfaces": [
|
|
11792
|
-
"cdk-nextjs.
|
|
12069
|
+
"cdk-nextjs.NextjsFunctionsConstructOverrides"
|
|
11793
12070
|
],
|
|
11794
12071
|
"kind": "interface",
|
|
11795
12072
|
"locationInModule": {
|
|
11796
12073
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11797
|
-
"line":
|
|
12074
|
+
"line": 34
|
|
11798
12075
|
},
|
|
11799
12076
|
"name": "NextjsGlobalFunctionsConstructOverrides",
|
|
11800
12077
|
"properties": [
|
|
@@ -11806,14 +12083,278 @@
|
|
|
11806
12083
|
"immutable": true,
|
|
11807
12084
|
"locationInModule": {
|
|
11808
12085
|
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11809
|
-
"line":
|
|
12086
|
+
"line": 35
|
|
11810
12087
|
},
|
|
11811
12088
|
"name": "nextjsDistributionProps",
|
|
11812
12089
|
"optional": true,
|
|
11813
12090
|
"type": {
|
|
11814
12091
|
"fqn": "cdk-nextjs.OptionalNextjsDistributionProps"
|
|
11815
12092
|
}
|
|
11816
|
-
},
|
|
12093
|
+
},
|
|
12094
|
+
{
|
|
12095
|
+
"abstract": true,
|
|
12096
|
+
"docs": {
|
|
12097
|
+
"stability": "stable"
|
|
12098
|
+
},
|
|
12099
|
+
"immutable": true,
|
|
12100
|
+
"locationInModule": {
|
|
12101
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12102
|
+
"line": 36
|
|
12103
|
+
},
|
|
12104
|
+
"name": "nextjsPostDeployProps",
|
|
12105
|
+
"optional": true,
|
|
12106
|
+
"type": {
|
|
12107
|
+
"fqn": "cdk-nextjs.OptionalNextjsPostDeployProps"
|
|
12108
|
+
}
|
|
12109
|
+
}
|
|
12110
|
+
],
|
|
12111
|
+
"symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsConstructOverrides"
|
|
12112
|
+
},
|
|
12113
|
+
"cdk-nextjs.NextjsGlobalFunctionsOverrides": {
|
|
12114
|
+
"assembly": "cdk-nextjs",
|
|
12115
|
+
"datatype": true,
|
|
12116
|
+
"docs": {
|
|
12117
|
+
"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.",
|
|
12118
|
+
"stability": "stable",
|
|
12119
|
+
"summary": "Overrides for `NextjsGlobalFunctions`."
|
|
12120
|
+
},
|
|
12121
|
+
"fqn": "cdk-nextjs.NextjsGlobalFunctionsOverrides",
|
|
12122
|
+
"interfaces": [
|
|
12123
|
+
"cdk-nextjs.NextjsBaseOverrides"
|
|
12124
|
+
],
|
|
12125
|
+
"kind": "interface",
|
|
12126
|
+
"locationInModule": {
|
|
12127
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12128
|
+
"line": 44
|
|
12129
|
+
},
|
|
12130
|
+
"name": "NextjsGlobalFunctionsOverrides",
|
|
12131
|
+
"properties": [
|
|
12132
|
+
{
|
|
12133
|
+
"abstract": true,
|
|
12134
|
+
"docs": {
|
|
12135
|
+
"stability": "stable"
|
|
12136
|
+
},
|
|
12137
|
+
"immutable": true,
|
|
12138
|
+
"locationInModule": {
|
|
12139
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12140
|
+
"line": 48
|
|
12141
|
+
},
|
|
12142
|
+
"name": "nextjsDistribution",
|
|
12143
|
+
"optional": true,
|
|
12144
|
+
"type": {
|
|
12145
|
+
"fqn": "cdk-nextjs.NextjsDistributionOverrides"
|
|
12146
|
+
}
|
|
12147
|
+
},
|
|
12148
|
+
{
|
|
12149
|
+
"abstract": true,
|
|
12150
|
+
"docs": {
|
|
12151
|
+
"stability": "stable"
|
|
12152
|
+
},
|
|
12153
|
+
"immutable": true,
|
|
12154
|
+
"locationInModule": {
|
|
12155
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12156
|
+
"line": 46
|
|
12157
|
+
},
|
|
12158
|
+
"name": "nextjsFunctions",
|
|
12159
|
+
"optional": true,
|
|
12160
|
+
"type": {
|
|
12161
|
+
"fqn": "cdk-nextjs.NextjsFunctionsOverrides"
|
|
12162
|
+
}
|
|
12163
|
+
},
|
|
12164
|
+
{
|
|
12165
|
+
"abstract": true,
|
|
12166
|
+
"docs": {
|
|
12167
|
+
"stability": "stable"
|
|
12168
|
+
},
|
|
12169
|
+
"immutable": true,
|
|
12170
|
+
"locationInModule": {
|
|
12171
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12172
|
+
"line": 45
|
|
12173
|
+
},
|
|
12174
|
+
"name": "nextjsGlobalFunctions",
|
|
12175
|
+
"optional": true,
|
|
12176
|
+
"type": {
|
|
12177
|
+
"fqn": "cdk-nextjs.NextjsGlobalFunctionsConstructOverrides"
|
|
12178
|
+
}
|
|
12179
|
+
},
|
|
12180
|
+
{
|
|
12181
|
+
"abstract": true,
|
|
12182
|
+
"docs": {
|
|
12183
|
+
"stability": "stable"
|
|
12184
|
+
},
|
|
12185
|
+
"immutable": true,
|
|
12186
|
+
"locationInModule": {
|
|
12187
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12188
|
+
"line": 47
|
|
12189
|
+
},
|
|
12190
|
+
"name": "nextjsImageFunction",
|
|
12191
|
+
"optional": true,
|
|
12192
|
+
"type": {
|
|
12193
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionOverrides"
|
|
12194
|
+
}
|
|
12195
|
+
},
|
|
12196
|
+
{
|
|
12197
|
+
"abstract": true,
|
|
12198
|
+
"docs": {
|
|
12199
|
+
"stability": "stable"
|
|
12200
|
+
},
|
|
12201
|
+
"immutable": true,
|
|
12202
|
+
"locationInModule": {
|
|
12203
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12204
|
+
"line": 49
|
|
12205
|
+
},
|
|
12206
|
+
"name": "nextjsPostDeploy",
|
|
12207
|
+
"optional": true,
|
|
12208
|
+
"type": {
|
|
12209
|
+
"fqn": "cdk-nextjs.NextjsPostDeployOverrides"
|
|
12210
|
+
}
|
|
12211
|
+
}
|
|
12212
|
+
],
|
|
12213
|
+
"symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsOverrides"
|
|
12214
|
+
},
|
|
12215
|
+
"cdk-nextjs.NextjsGlobalFunctionsProps": {
|
|
12216
|
+
"assembly": "cdk-nextjs",
|
|
12217
|
+
"datatype": true,
|
|
12218
|
+
"docs": {
|
|
12219
|
+
"stability": "stable"
|
|
12220
|
+
},
|
|
12221
|
+
"fqn": "cdk-nextjs.NextjsGlobalFunctionsProps",
|
|
12222
|
+
"interfaces": [
|
|
12223
|
+
"cdk-nextjs.NextjsBaseProps"
|
|
12224
|
+
],
|
|
12225
|
+
"kind": "interface",
|
|
12226
|
+
"locationInModule": {
|
|
12227
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12228
|
+
"line": 52
|
|
12229
|
+
},
|
|
12230
|
+
"name": "NextjsGlobalFunctionsProps",
|
|
12231
|
+
"properties": [
|
|
12232
|
+
{
|
|
12233
|
+
"abstract": true,
|
|
12234
|
+
"docs": {
|
|
12235
|
+
"remarks": "Can be used with `basePath` to host multiple\napps on the same CloudFront distribution.",
|
|
12236
|
+
"stability": "stable",
|
|
12237
|
+
"summary": "Bring your own distribution."
|
|
12238
|
+
},
|
|
12239
|
+
"immutable": true,
|
|
12240
|
+
"locationInModule": {
|
|
12241
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12242
|
+
"line": 57
|
|
12243
|
+
},
|
|
12244
|
+
"name": "distribution",
|
|
12245
|
+
"optional": true,
|
|
12246
|
+
"type": {
|
|
12247
|
+
"fqn": "aws-cdk-lib.aws_cloudfront.Distribution"
|
|
12248
|
+
}
|
|
12249
|
+
},
|
|
12250
|
+
{
|
|
12251
|
+
"abstract": true,
|
|
12252
|
+
"docs": {
|
|
12253
|
+
"stability": "stable",
|
|
12254
|
+
"summary": "Override props of any construct."
|
|
12255
|
+
},
|
|
12256
|
+
"immutable": true,
|
|
12257
|
+
"locationInModule": {
|
|
12258
|
+
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
12259
|
+
"line": 61
|
|
12260
|
+
},
|
|
12261
|
+
"name": "overrides",
|
|
12262
|
+
"optional": true,
|
|
12263
|
+
"type": {
|
|
12264
|
+
"fqn": "cdk-nextjs.NextjsGlobalFunctionsOverrides"
|
|
12265
|
+
}
|
|
12266
|
+
}
|
|
12267
|
+
],
|
|
12268
|
+
"symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsProps"
|
|
12269
|
+
},
|
|
12270
|
+
"cdk-nextjs.NextjsImageFunction": {
|
|
12271
|
+
"assembly": "cdk-nextjs",
|
|
12272
|
+
"base": "constructs.Construct",
|
|
12273
|
+
"docs": {
|
|
12274
|
+
"stability": "stable",
|
|
12275
|
+
"summary": "Dedicated Lambda function for Next.js image optimization (`src/image-optimization/handler.mts`). Kept separate from the server function so image requests get a lightweight, natively-streaming zip Lambda instead of paying the Docker/Lambda Web Adapter cold-start cost."
|
|
12276
|
+
},
|
|
12277
|
+
"fqn": "cdk-nextjs.NextjsImageFunction",
|
|
12278
|
+
"initializer": {
|
|
12279
|
+
"docs": {
|
|
12280
|
+
"stability": "stable"
|
|
12281
|
+
},
|
|
12282
|
+
"locationInModule": {
|
|
12283
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12284
|
+
"line": 67
|
|
12285
|
+
},
|
|
12286
|
+
"parameters": [
|
|
12287
|
+
{
|
|
12288
|
+
"name": "scope",
|
|
12289
|
+
"type": {
|
|
12290
|
+
"fqn": "constructs.Construct"
|
|
12291
|
+
}
|
|
12292
|
+
},
|
|
12293
|
+
{
|
|
12294
|
+
"name": "id",
|
|
12295
|
+
"type": {
|
|
12296
|
+
"primitive": "string"
|
|
12297
|
+
}
|
|
12298
|
+
},
|
|
12299
|
+
{
|
|
12300
|
+
"name": "props",
|
|
12301
|
+
"type": {
|
|
12302
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionProps"
|
|
12303
|
+
}
|
|
12304
|
+
}
|
|
12305
|
+
]
|
|
12306
|
+
},
|
|
12307
|
+
"kind": "class",
|
|
12308
|
+
"locationInModule": {
|
|
12309
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12310
|
+
"line": 61
|
|
12311
|
+
},
|
|
12312
|
+
"name": "NextjsImageFunction",
|
|
12313
|
+
"properties": [
|
|
12314
|
+
{
|
|
12315
|
+
"docs": {
|
|
12316
|
+
"stability": "stable"
|
|
12317
|
+
},
|
|
12318
|
+
"locationInModule": {
|
|
12319
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12320
|
+
"line": 62
|
|
12321
|
+
},
|
|
12322
|
+
"name": "function",
|
|
12323
|
+
"type": {
|
|
12324
|
+
"fqn": "aws-cdk-lib.aws_lambda.Function"
|
|
12325
|
+
}
|
|
12326
|
+
},
|
|
12327
|
+
{
|
|
12328
|
+
"docs": {
|
|
12329
|
+
"stability": "stable"
|
|
12330
|
+
},
|
|
12331
|
+
"locationInModule": {
|
|
12332
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12333
|
+
"line": 63
|
|
12334
|
+
},
|
|
12335
|
+
"name": "functionUrl",
|
|
12336
|
+
"optional": true,
|
|
12337
|
+
"type": {
|
|
12338
|
+
"fqn": "aws-cdk-lib.aws_lambda.FunctionUrl"
|
|
12339
|
+
}
|
|
12340
|
+
}
|
|
12341
|
+
],
|
|
12342
|
+
"symbolId": "src/nextjs-compute/nextjs-image-function:NextjsImageFunction"
|
|
12343
|
+
},
|
|
12344
|
+
"cdk-nextjs.NextjsImageFunctionOverrides": {
|
|
12345
|
+
"assembly": "cdk-nextjs",
|
|
12346
|
+
"datatype": true,
|
|
12347
|
+
"docs": {
|
|
12348
|
+
"stability": "stable"
|
|
12349
|
+
},
|
|
12350
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionOverrides",
|
|
12351
|
+
"kind": "interface",
|
|
12352
|
+
"locationInModule": {
|
|
12353
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12354
|
+
"line": 20
|
|
12355
|
+
},
|
|
12356
|
+
"name": "NextjsImageFunctionOverrides",
|
|
12357
|
+
"properties": [
|
|
11817
12358
|
{
|
|
11818
12359
|
"abstract": true,
|
|
11819
12360
|
"docs": {
|
|
@@ -11821,13 +12362,13 @@
|
|
|
11821
12362
|
},
|
|
11822
12363
|
"immutable": true,
|
|
11823
12364
|
"locationInModule": {
|
|
11824
|
-
"filename": "src/
|
|
11825
|
-
"line":
|
|
12365
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12366
|
+
"line": 21
|
|
11826
12367
|
},
|
|
11827
|
-
"name": "
|
|
12368
|
+
"name": "functionProps",
|
|
11828
12369
|
"optional": true,
|
|
11829
12370
|
"type": {
|
|
11830
|
-
"fqn": "cdk-nextjs.
|
|
12371
|
+
"fqn": "cdk-nextjs.OptionalFunctionProps"
|
|
11831
12372
|
}
|
|
11832
12373
|
},
|
|
11833
12374
|
{
|
|
@@ -11837,51 +12378,47 @@
|
|
|
11837
12378
|
},
|
|
11838
12379
|
"immutable": true,
|
|
11839
12380
|
"locationInModule": {
|
|
11840
|
-
"filename": "src/
|
|
11841
|
-
"line":
|
|
12381
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12382
|
+
"line": 22
|
|
11842
12383
|
},
|
|
11843
|
-
"name": "
|
|
12384
|
+
"name": "functionUrlProps",
|
|
11844
12385
|
"optional": true,
|
|
11845
12386
|
"type": {
|
|
11846
|
-
"fqn": "cdk-nextjs.
|
|
12387
|
+
"fqn": "cdk-nextjs.OptionalFunctionUrlProps"
|
|
11847
12388
|
}
|
|
11848
12389
|
}
|
|
11849
12390
|
],
|
|
11850
|
-
"symbolId": "src/
|
|
12391
|
+
"symbolId": "src/nextjs-compute/nextjs-image-function:NextjsImageFunctionOverrides"
|
|
11851
12392
|
},
|
|
11852
|
-
"cdk-nextjs.
|
|
12393
|
+
"cdk-nextjs.NextjsImageFunctionProps": {
|
|
11853
12394
|
"assembly": "cdk-nextjs",
|
|
11854
12395
|
"datatype": true,
|
|
11855
12396
|
"docs": {
|
|
11856
|
-
"
|
|
11857
|
-
"stability": "stable",
|
|
11858
|
-
"summary": "Overrides for `NextjsGlobalFunctions`."
|
|
12397
|
+
"stability": "stable"
|
|
11859
12398
|
},
|
|
11860
|
-
"fqn": "cdk-nextjs.
|
|
11861
|
-
"interfaces": [
|
|
11862
|
-
"cdk-nextjs.NextjsBaseOverrides"
|
|
11863
|
-
],
|
|
12399
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionProps",
|
|
11864
12400
|
"kind": "interface",
|
|
11865
12401
|
"locationInModule": {
|
|
11866
|
-
"filename": "src/
|
|
11867
|
-
"line":
|
|
12402
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12403
|
+
"line": 25
|
|
11868
12404
|
},
|
|
11869
|
-
"name": "
|
|
12405
|
+
"name": "NextjsImageFunctionProps",
|
|
11870
12406
|
"properties": [
|
|
11871
12407
|
{
|
|
11872
12408
|
"abstract": true,
|
|
11873
12409
|
"docs": {
|
|
11874
|
-
"
|
|
12410
|
+
"see": "{@link NextjsBuild.imageOptimizationAssetPath }",
|
|
12411
|
+
"stability": "stable",
|
|
12412
|
+
"summary": "Absolute path to the asset prepared by `NextjsBuild`: bundled handler, glibc `sharp` binaries, and `required-server-files.json`."
|
|
11875
12413
|
},
|
|
11876
12414
|
"immutable": true,
|
|
11877
12415
|
"locationInModule": {
|
|
11878
|
-
"filename": "src/
|
|
11879
|
-
"line":
|
|
12416
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12417
|
+
"line": 32
|
|
11880
12418
|
},
|
|
11881
|
-
"name": "
|
|
11882
|
-
"optional": true,
|
|
12419
|
+
"name": "imageOptimizationAssetPath",
|
|
11883
12420
|
"type": {
|
|
11884
|
-
"
|
|
12421
|
+
"primitive": "string"
|
|
11885
12422
|
}
|
|
11886
12423
|
},
|
|
11887
12424
|
{
|
|
@@ -11891,104 +12428,83 @@
|
|
|
11891
12428
|
},
|
|
11892
12429
|
"immutable": true,
|
|
11893
12430
|
"locationInModule": {
|
|
11894
|
-
"filename": "src/
|
|
11895
|
-
"line":
|
|
12431
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12432
|
+
"line": 26
|
|
11896
12433
|
},
|
|
11897
|
-
"name": "
|
|
11898
|
-
"optional": true,
|
|
12434
|
+
"name": "nextjsType",
|
|
11899
12435
|
"type": {
|
|
11900
|
-
"fqn": "cdk-nextjs.
|
|
12436
|
+
"fqn": "cdk-nextjs.NextjsType"
|
|
11901
12437
|
}
|
|
11902
12438
|
},
|
|
11903
12439
|
{
|
|
11904
12440
|
"abstract": true,
|
|
11905
12441
|
"docs": {
|
|
11906
|
-
"stability": "stable"
|
|
12442
|
+
"stability": "stable",
|
|
12443
|
+
"summary": "S3 bucket containing static assets, read by the handler to serve non-absolute image URLs."
|
|
11907
12444
|
},
|
|
11908
12445
|
"immutable": true,
|
|
11909
12446
|
"locationInModule": {
|
|
11910
|
-
"filename": "src/
|
|
11911
|
-
"line":
|
|
12447
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12448
|
+
"line": 37
|
|
11912
12449
|
},
|
|
11913
|
-
"name": "
|
|
11914
|
-
"optional": true,
|
|
12450
|
+
"name": "staticAssetsBucket",
|
|
11915
12451
|
"type": {
|
|
11916
|
-
"fqn": "cdk-
|
|
12452
|
+
"fqn": "aws-cdk-lib.aws_s3.IBucket"
|
|
11917
12453
|
}
|
|
11918
12454
|
},
|
|
11919
12455
|
{
|
|
11920
12456
|
"abstract": true,
|
|
11921
12457
|
"docs": {
|
|
11922
|
-
"stability": "stable"
|
|
12458
|
+
"stability": "stable",
|
|
12459
|
+
"summary": "Override props of any construct."
|
|
11923
12460
|
},
|
|
11924
12461
|
"immutable": true,
|
|
11925
12462
|
"locationInModule": {
|
|
11926
|
-
"filename": "src/
|
|
11927
|
-
"line":
|
|
12463
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12464
|
+
"line": 52
|
|
11928
12465
|
},
|
|
11929
|
-
"name": "
|
|
12466
|
+
"name": "overrides",
|
|
11930
12467
|
"optional": true,
|
|
11931
12468
|
"type": {
|
|
11932
|
-
"fqn": "cdk-nextjs.
|
|
12469
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionOverrides"
|
|
11933
12470
|
}
|
|
11934
|
-
}
|
|
11935
|
-
],
|
|
11936
|
-
"symbolId": "src/root-constructs/nextjs-global-functions:NextjsGlobalFunctionsOverrides"
|
|
11937
|
-
},
|
|
11938
|
-
"cdk-nextjs.NextjsGlobalFunctionsProps": {
|
|
11939
|
-
"assembly": "cdk-nextjs",
|
|
11940
|
-
"datatype": true,
|
|
11941
|
-
"docs": {
|
|
11942
|
-
"stability": "stable"
|
|
11943
|
-
},
|
|
11944
|
-
"fqn": "cdk-nextjs.NextjsGlobalFunctionsProps",
|
|
11945
|
-
"interfaces": [
|
|
11946
|
-
"cdk-nextjs.NextjsBaseProps"
|
|
11947
|
-
],
|
|
11948
|
-
"kind": "interface",
|
|
11949
|
-
"locationInModule": {
|
|
11950
|
-
"filename": "src/root-constructs/nextjs-global-functions.ts",
|
|
11951
|
-
"line": 47
|
|
11952
|
-
},
|
|
11953
|
-
"name": "NextjsGlobalFunctionsProps",
|
|
11954
|
-
"properties": [
|
|
12471
|
+
},
|
|
11955
12472
|
{
|
|
11956
12473
|
"abstract": true,
|
|
11957
12474
|
"docs": {
|
|
11958
|
-
"remarks": "
|
|
12475
|
+
"remarks": "Threaded through explicitly rather than read from the app's bundled config,\nbecause it's distinct from the app's own `basePath` (which next-image-loader\nbakes into hrefs) — the two diverge when the app's `basePath` comes from\nelsewhere, e.g. an API Gateway stage under `NextjsRegionalFunctions`.",
|
|
11959
12476
|
"stability": "stable",
|
|
11960
|
-
"summary": "
|
|
12477
|
+
"summary": "S3 key prefix the static assets were uploaded under, i.e. `NextjsStaticAssets.keyPrefix`, which namespaces a shared bucket."
|
|
11961
12478
|
},
|
|
11962
12479
|
"immutable": true,
|
|
11963
12480
|
"locationInModule": {
|
|
11964
|
-
"filename": "src/
|
|
11965
|
-
"line":
|
|
12481
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12482
|
+
"line": 47
|
|
11966
12483
|
},
|
|
11967
|
-
"name": "
|
|
12484
|
+
"name": "staticAssetsKeyPrefix",
|
|
11968
12485
|
"optional": true,
|
|
11969
12486
|
"type": {
|
|
11970
|
-
"
|
|
12487
|
+
"primitive": "string"
|
|
11971
12488
|
}
|
|
11972
12489
|
},
|
|
11973
12490
|
{
|
|
11974
12491
|
"abstract": true,
|
|
11975
12492
|
"docs": {
|
|
11976
|
-
"stability": "stable"
|
|
11977
|
-
"summary": "Override props of any construct."
|
|
12493
|
+
"stability": "stable"
|
|
11978
12494
|
},
|
|
11979
12495
|
"immutable": true,
|
|
11980
12496
|
"locationInModule": {
|
|
11981
|
-
"filename": "src/
|
|
11982
|
-
"line":
|
|
12497
|
+
"filename": "src/nextjs-compute/nextjs-image-function.ts",
|
|
12498
|
+
"line": 48
|
|
11983
12499
|
},
|
|
11984
|
-
"name": "
|
|
12500
|
+
"name": "vpc",
|
|
11985
12501
|
"optional": true,
|
|
11986
12502
|
"type": {
|
|
11987
|
-
"fqn": "cdk-
|
|
12503
|
+
"fqn": "aws-cdk-lib.aws_ec2.IVpc"
|
|
11988
12504
|
}
|
|
11989
12505
|
}
|
|
11990
12506
|
],
|
|
11991
|
-
"symbolId": "src/
|
|
12507
|
+
"symbolId": "src/nextjs-compute/nextjs-image-function:NextjsImageFunctionProps"
|
|
11992
12508
|
},
|
|
11993
12509
|
"cdk-nextjs.NextjsPostDeploy": {
|
|
11994
12510
|
"assembly": "cdk-nextjs",
|
|
@@ -12563,7 +13079,7 @@
|
|
|
12563
13079
|
},
|
|
12564
13080
|
"locationInModule": {
|
|
12565
13081
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12566
|
-
"line":
|
|
13082
|
+
"line": 70
|
|
12567
13083
|
},
|
|
12568
13084
|
"parameters": [
|
|
12569
13085
|
{
|
|
@@ -12589,7 +13105,7 @@
|
|
|
12589
13105
|
"kind": "class",
|
|
12590
13106
|
"locationInModule": {
|
|
12591
13107
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12592
|
-
"line":
|
|
13108
|
+
"line": 54
|
|
12593
13109
|
},
|
|
12594
13110
|
"name": "NextjsRegionalFunctions",
|
|
12595
13111
|
"properties": [
|
|
@@ -12600,7 +13116,7 @@
|
|
|
12600
13116
|
"immutable": true,
|
|
12601
13117
|
"locationInModule": {
|
|
12602
13118
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12603
|
-
"line":
|
|
13119
|
+
"line": 64
|
|
12604
13120
|
},
|
|
12605
13121
|
"name": "url",
|
|
12606
13122
|
"overrides": "cdk-nextjs.NextjsBaseConstruct",
|
|
@@ -12614,7 +13130,7 @@
|
|
|
12614
13130
|
},
|
|
12615
13131
|
"locationInModule": {
|
|
12616
13132
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12617
|
-
"line":
|
|
13133
|
+
"line": 62
|
|
12618
13134
|
},
|
|
12619
13135
|
"name": "nextjsApi",
|
|
12620
13136
|
"type": {
|
|
@@ -12627,7 +13143,7 @@
|
|
|
12627
13143
|
},
|
|
12628
13144
|
"locationInModule": {
|
|
12629
13145
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12630
|
-
"line":
|
|
13146
|
+
"line": 55
|
|
12631
13147
|
},
|
|
12632
13148
|
"name": "nextjsFunctions",
|
|
12633
13149
|
"type": {
|
|
@@ -12640,12 +13156,28 @@
|
|
|
12640
13156
|
},
|
|
12641
13157
|
"locationInModule": {
|
|
12642
13158
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12643
|
-
"line":
|
|
13159
|
+
"line": 63
|
|
12644
13160
|
},
|
|
12645
13161
|
"name": "nextjsPostDeploy",
|
|
12646
13162
|
"type": {
|
|
12647
13163
|
"fqn": "cdk-nextjs.NextjsPostDeploy"
|
|
12648
13164
|
}
|
|
13165
|
+
},
|
|
13166
|
+
{
|
|
13167
|
+
"docs": {
|
|
13168
|
+
"remarks": "`_next/image` is otherwise served by\n{@link nextjsFunctions}.",
|
|
13169
|
+
"stability": "stable",
|
|
13170
|
+
"summary": "Only created when the (experimental, unsupported) dedicated image optimization Lambda is enabled."
|
|
13171
|
+
},
|
|
13172
|
+
"locationInModule": {
|
|
13173
|
+
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
13174
|
+
"line": 61
|
|
13175
|
+
},
|
|
13176
|
+
"name": "nextjsImageFunction",
|
|
13177
|
+
"optional": true,
|
|
13178
|
+
"type": {
|
|
13179
|
+
"fqn": "cdk-nextjs.NextjsImageFunction"
|
|
13180
|
+
}
|
|
12649
13181
|
}
|
|
12650
13182
|
],
|
|
12651
13183
|
"symbolId": "src/root-constructs/nextjs-regional-functions:NextjsRegionalFunctions"
|
|
@@ -12658,12 +13190,12 @@
|
|
|
12658
13190
|
},
|
|
12659
13191
|
"fqn": "cdk-nextjs.NextjsRegionalFunctionsConstructOverrides",
|
|
12660
13192
|
"interfaces": [
|
|
12661
|
-
"cdk-nextjs.
|
|
13193
|
+
"cdk-nextjs.NextjsFunctionsConstructOverrides"
|
|
12662
13194
|
],
|
|
12663
13195
|
"kind": "interface",
|
|
12664
13196
|
"locationInModule": {
|
|
12665
13197
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12666
|
-
"line":
|
|
13198
|
+
"line": 25
|
|
12667
13199
|
},
|
|
12668
13200
|
"name": "NextjsRegionalFunctionsConstructOverrides",
|
|
12669
13201
|
"properties": [
|
|
@@ -12675,7 +13207,7 @@
|
|
|
12675
13207
|
"immutable": true,
|
|
12676
13208
|
"locationInModule": {
|
|
12677
13209
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12678
|
-
"line":
|
|
13210
|
+
"line": 26
|
|
12679
13211
|
},
|
|
12680
13212
|
"name": "nextjsApiProps",
|
|
12681
13213
|
"optional": true,
|
|
@@ -12691,23 +13223,7 @@
|
|
|
12691
13223
|
"immutable": true,
|
|
12692
13224
|
"locationInModule": {
|
|
12693
13225
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12694
|
-
"line":
|
|
12695
|
-
},
|
|
12696
|
-
"name": "nextjsFunctionsProps",
|
|
12697
|
-
"optional": true,
|
|
12698
|
-
"type": {
|
|
12699
|
-
"fqn": "cdk-nextjs.NextjsFunctionsProps"
|
|
12700
|
-
}
|
|
12701
|
-
},
|
|
12702
|
-
{
|
|
12703
|
-
"abstract": true,
|
|
12704
|
-
"docs": {
|
|
12705
|
-
"stability": "stable"
|
|
12706
|
-
},
|
|
12707
|
-
"immutable": true,
|
|
12708
|
-
"locationInModule": {
|
|
12709
|
-
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12710
|
-
"line": 25
|
|
13226
|
+
"line": 27
|
|
12711
13227
|
},
|
|
12712
13228
|
"name": "nextjsPostDeployProps",
|
|
12713
13229
|
"optional": true,
|
|
@@ -12733,7 +13249,7 @@
|
|
|
12733
13249
|
"kind": "interface",
|
|
12734
13250
|
"locationInModule": {
|
|
12735
13251
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12736
|
-
"line":
|
|
13252
|
+
"line": 35
|
|
12737
13253
|
},
|
|
12738
13254
|
"name": "NextjsRegionalFunctionsOverrides",
|
|
12739
13255
|
"properties": [
|
|
@@ -12745,7 +13261,7 @@
|
|
|
12745
13261
|
"immutable": true,
|
|
12746
13262
|
"locationInModule": {
|
|
12747
13263
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12748
|
-
"line":
|
|
13264
|
+
"line": 39
|
|
12749
13265
|
},
|
|
12750
13266
|
"name": "nextjsApi",
|
|
12751
13267
|
"optional": true,
|
|
@@ -12761,7 +13277,7 @@
|
|
|
12761
13277
|
"immutable": true,
|
|
12762
13278
|
"locationInModule": {
|
|
12763
13279
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12764
|
-
"line":
|
|
13280
|
+
"line": 37
|
|
12765
13281
|
},
|
|
12766
13282
|
"name": "nextjsFunctions",
|
|
12767
13283
|
"optional": true,
|
|
@@ -12777,7 +13293,23 @@
|
|
|
12777
13293
|
"immutable": true,
|
|
12778
13294
|
"locationInModule": {
|
|
12779
13295
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12780
|
-
"line":
|
|
13296
|
+
"line": 38
|
|
13297
|
+
},
|
|
13298
|
+
"name": "nextjsImageFunction",
|
|
13299
|
+
"optional": true,
|
|
13300
|
+
"type": {
|
|
13301
|
+
"fqn": "cdk-nextjs.NextjsImageFunctionOverrides"
|
|
13302
|
+
}
|
|
13303
|
+
},
|
|
13304
|
+
{
|
|
13305
|
+
"abstract": true,
|
|
13306
|
+
"docs": {
|
|
13307
|
+
"stability": "stable"
|
|
13308
|
+
},
|
|
13309
|
+
"immutable": true,
|
|
13310
|
+
"locationInModule": {
|
|
13311
|
+
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
13312
|
+
"line": 40
|
|
12781
13313
|
},
|
|
12782
13314
|
"name": "nextjsPostDeploy",
|
|
12783
13315
|
"optional": true,
|
|
@@ -12793,7 +13325,7 @@
|
|
|
12793
13325
|
"immutable": true,
|
|
12794
13326
|
"locationInModule": {
|
|
12795
13327
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12796
|
-
"line":
|
|
13328
|
+
"line": 36
|
|
12797
13329
|
},
|
|
12798
13330
|
"name": "nextjsRegionalFunctions",
|
|
12799
13331
|
"optional": true,
|
|
@@ -12817,7 +13349,7 @@
|
|
|
12817
13349
|
"kind": "interface",
|
|
12818
13350
|
"locationInModule": {
|
|
12819
13351
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12820
|
-
"line":
|
|
13352
|
+
"line": 43
|
|
12821
13353
|
},
|
|
12822
13354
|
"name": "NextjsRegionalFunctionsProps",
|
|
12823
13355
|
"properties": [
|
|
@@ -12830,7 +13362,7 @@
|
|
|
12830
13362
|
"immutable": true,
|
|
12831
13363
|
"locationInModule": {
|
|
12832
13364
|
"filename": "src/root-constructs/nextjs-regional-functions.ts",
|
|
12833
|
-
"line":
|
|
13365
|
+
"line": 47
|
|
12834
13366
|
},
|
|
12835
13367
|
"name": "overrides",
|
|
12836
13368
|
"optional": true,
|
|
@@ -12855,7 +13387,7 @@
|
|
|
12855
13387
|
},
|
|
12856
13388
|
"locationInModule": {
|
|
12857
13389
|
"filename": "src/nextjs-static-assets.ts",
|
|
12858
|
-
"line":
|
|
13390
|
+
"line": 77
|
|
12859
13391
|
},
|
|
12860
13392
|
"parameters": [
|
|
12861
13393
|
{
|
|
@@ -12881,17 +13413,33 @@
|
|
|
12881
13413
|
"kind": "class",
|
|
12882
13414
|
"locationInModule": {
|
|
12883
13415
|
"filename": "src/nextjs-static-assets.ts",
|
|
12884
|
-
"line":
|
|
13416
|
+
"line": 60
|
|
12885
13417
|
},
|
|
12886
13418
|
"name": "NextjsStaticAssets",
|
|
12887
13419
|
"properties": [
|
|
13420
|
+
{
|
|
13421
|
+
"docs": {
|
|
13422
|
+
"remarks": "Consumers that read assets back out of the bucket (the image optimization\nLambda, `NextjsApi`'s S3 integrations) must use this rather than the\n`basePath` prop, since `overrides.bucketDeploymentProps` can replace the\nprefix outright.",
|
|
13423
|
+
"stability": "stable",
|
|
13424
|
+
"summary": "S3 key prefix the assets are actually uploaded under, normalized to a bare path segment (empty when they live at the bucket root)."
|
|
13425
|
+
},
|
|
13426
|
+
"immutable": true,
|
|
13427
|
+
"locationInModule": {
|
|
13428
|
+
"filename": "src/nextjs-static-assets.ts",
|
|
13429
|
+
"line": 72
|
|
13430
|
+
},
|
|
13431
|
+
"name": "keyPrefix",
|
|
13432
|
+
"type": {
|
|
13433
|
+
"primitive": "string"
|
|
13434
|
+
}
|
|
13435
|
+
},
|
|
12888
13436
|
{
|
|
12889
13437
|
"docs": {
|
|
12890
13438
|
"stability": "stable"
|
|
12891
13439
|
},
|
|
12892
13440
|
"locationInModule": {
|
|
12893
13441
|
"filename": "src/nextjs-static-assets.ts",
|
|
12894
|
-
"line":
|
|
13442
|
+
"line": 61
|
|
12895
13443
|
},
|
|
12896
13444
|
"name": "bucket",
|
|
12897
13445
|
"type": {
|
|
@@ -12904,7 +13452,7 @@
|
|
|
12904
13452
|
},
|
|
12905
13453
|
"locationInModule": {
|
|
12906
13454
|
"filename": "src/nextjs-static-assets.ts",
|
|
12907
|
-
"line":
|
|
13455
|
+
"line": 62
|
|
12908
13456
|
},
|
|
12909
13457
|
"name": "deployment",
|
|
12910
13458
|
"type": {
|
|
@@ -12924,7 +13472,7 @@
|
|
|
12924
13472
|
"kind": "interface",
|
|
12925
13473
|
"locationInModule": {
|
|
12926
13474
|
"filename": "src/nextjs-static-assets.ts",
|
|
12927
|
-
"line":
|
|
13475
|
+
"line": 28
|
|
12928
13476
|
},
|
|
12929
13477
|
"name": "NextjsStaticAssetsOverrides",
|
|
12930
13478
|
"properties": [
|
|
@@ -12936,7 +13484,7 @@
|
|
|
12936
13484
|
"immutable": true,
|
|
12937
13485
|
"locationInModule": {
|
|
12938
13486
|
"filename": "src/nextjs-static-assets.ts",
|
|
12939
|
-
"line":
|
|
13487
|
+
"line": 30
|
|
12940
13488
|
},
|
|
12941
13489
|
"name": "bucketDeploymentProps",
|
|
12942
13490
|
"optional": true,
|
|
@@ -12952,7 +13500,7 @@
|
|
|
12952
13500
|
"immutable": true,
|
|
12953
13501
|
"locationInModule": {
|
|
12954
13502
|
"filename": "src/nextjs-static-assets.ts",
|
|
12955
|
-
"line":
|
|
13503
|
+
"line": 29
|
|
12956
13504
|
},
|
|
12957
13505
|
"name": "bucketProps",
|
|
12958
13506
|
"optional": true,
|
|
@@ -12973,7 +13521,7 @@
|
|
|
12973
13521
|
"kind": "interface",
|
|
12974
13522
|
"locationInModule": {
|
|
12975
13523
|
"filename": "src/nextjs-static-assets.ts",
|
|
12976
|
-
"line":
|
|
13524
|
+
"line": 33
|
|
12977
13525
|
},
|
|
12978
13526
|
"name": "NextjsStaticAssetsProps",
|
|
12979
13527
|
"properties": [
|
|
@@ -12986,7 +13534,7 @@
|
|
|
12986
13534
|
"immutable": true,
|
|
12987
13535
|
"locationInModule": {
|
|
12988
13536
|
"filename": "src/nextjs-static-assets.ts",
|
|
12989
|
-
"line":
|
|
13537
|
+
"line": 44
|
|
12990
13538
|
},
|
|
12991
13539
|
"name": "buildDirectory",
|
|
12992
13540
|
"type": {
|
|
@@ -13002,7 +13550,7 @@
|
|
|
13002
13550
|
"immutable": true,
|
|
13003
13551
|
"locationInModule": {
|
|
13004
13552
|
"filename": "src/nextjs-static-assets.ts",
|
|
13005
|
-
"line":
|
|
13553
|
+
"line": 48
|
|
13006
13554
|
},
|
|
13007
13555
|
"name": "buildId",
|
|
13008
13556
|
"type": {
|
|
@@ -13019,7 +13567,7 @@
|
|
|
13019
13567
|
"immutable": true,
|
|
13020
13568
|
"locationInModule": {
|
|
13021
13569
|
"filename": "src/nextjs-static-assets.ts",
|
|
13022
|
-
"line":
|
|
13570
|
+
"line": 53
|
|
13023
13571
|
},
|
|
13024
13572
|
"name": "basePath",
|
|
13025
13573
|
"optional": true,
|
|
@@ -13037,7 +13585,7 @@
|
|
|
13037
13585
|
"immutable": true,
|
|
13038
13586
|
"locationInModule": {
|
|
13039
13587
|
"filename": "src/nextjs-static-assets.ts",
|
|
13040
|
-
"line":
|
|
13588
|
+
"line": 39
|
|
13041
13589
|
},
|
|
13042
13590
|
"name": "bucket",
|
|
13043
13591
|
"optional": true,
|
|
@@ -13053,7 +13601,7 @@
|
|
|
13053
13601
|
"immutable": true,
|
|
13054
13602
|
"locationInModule": {
|
|
13055
13603
|
"filename": "src/nextjs-static-assets.ts",
|
|
13056
|
-
"line":
|
|
13604
|
+
"line": 54
|
|
13057
13605
|
},
|
|
13058
13606
|
"name": "overrides",
|
|
13059
13607
|
"optional": true,
|
|
@@ -18294,7 +18842,7 @@
|
|
|
18294
18842
|
"immutable": true,
|
|
18295
18843
|
"locationInModule": {
|
|
18296
18844
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18297
|
-
"line":
|
|
18845
|
+
"line": 59
|
|
18298
18846
|
},
|
|
18299
18847
|
"name": "assetsBucket",
|
|
18300
18848
|
"optional": true,
|
|
@@ -18305,12 +18853,14 @@
|
|
|
18305
18853
|
{
|
|
18306
18854
|
"abstract": true,
|
|
18307
18855
|
"docs": {
|
|
18308
|
-
"
|
|
18856
|
+
"remarks": "Surrounding slashes are normalized\naway, so \"/base\", \"base\" and \"/base/\" all produce the same cache behaviors.",
|
|
18857
|
+
"stability": "stable",
|
|
18858
|
+
"summary": "URI path prefix the app is served at."
|
|
18309
18859
|
},
|
|
18310
18860
|
"immutable": true,
|
|
18311
18861
|
"locationInModule": {
|
|
18312
18862
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18313
|
-
"line":
|
|
18863
|
+
"line": 44
|
|
18314
18864
|
},
|
|
18315
18865
|
"name": "basePath",
|
|
18316
18866
|
"optional": true,
|
|
@@ -18327,7 +18877,7 @@
|
|
|
18327
18877
|
"immutable": true,
|
|
18328
18878
|
"locationInModule": {
|
|
18329
18879
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18330
|
-
"line":
|
|
18880
|
+
"line": 37
|
|
18331
18881
|
},
|
|
18332
18882
|
"name": "certificate",
|
|
18333
18883
|
"optional": true,
|
|
@@ -18343,7 +18893,7 @@
|
|
|
18343
18893
|
"immutable": true,
|
|
18344
18894
|
"locationInModule": {
|
|
18345
18895
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18346
|
-
"line":
|
|
18896
|
+
"line": 32
|
|
18347
18897
|
},
|
|
18348
18898
|
"name": "distribution",
|
|
18349
18899
|
"optional": true,
|
|
@@ -18360,7 +18910,7 @@
|
|
|
18360
18910
|
"immutable": true,
|
|
18361
18911
|
"locationInModule": {
|
|
18362
18912
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18363
|
-
"line":
|
|
18913
|
+
"line": 28
|
|
18364
18914
|
},
|
|
18365
18915
|
"name": "functionUrl",
|
|
18366
18916
|
"optional": true,
|
|
@@ -18368,6 +18918,24 @@
|
|
|
18368
18918
|
"fqn": "aws-cdk-lib.aws_lambda.IFunctionUrl"
|
|
18369
18919
|
}
|
|
18370
18920
|
},
|
|
18921
|
+
{
|
|
18922
|
+
"abstract": true,
|
|
18923
|
+
"docs": {
|
|
18924
|
+
"remarks": "Only applicable\nto `NextjsType.GLOBAL_FUNCTIONS`, and only when the dedicated image\nfunction is enabled. When omitted, the `_next/image*` behavior points at\nthe dynamic origin, which serves image optimization from the Next.js\nserver itself.",
|
|
18925
|
+
"stability": "stable",
|
|
18926
|
+
"summary": "Function URL of the dedicated image optimization Lambda."
|
|
18927
|
+
},
|
|
18928
|
+
"immutable": true,
|
|
18929
|
+
"locationInModule": {
|
|
18930
|
+
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18931
|
+
"line": 23
|
|
18932
|
+
},
|
|
18933
|
+
"name": "imageFunctionUrl",
|
|
18934
|
+
"optional": true,
|
|
18935
|
+
"type": {
|
|
18936
|
+
"fqn": "aws-cdk-lib.aws_lambda.IFunctionUrl"
|
|
18937
|
+
}
|
|
18938
|
+
},
|
|
18371
18939
|
{
|
|
18372
18940
|
"abstract": true,
|
|
18373
18941
|
"docs": {
|
|
@@ -18393,7 +18961,7 @@
|
|
|
18393
18961
|
"immutable": true,
|
|
18394
18962
|
"locationInModule": {
|
|
18395
18963
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18396
|
-
"line":
|
|
18964
|
+
"line": 53
|
|
18397
18965
|
},
|
|
18398
18966
|
"name": "nextjsType",
|
|
18399
18967
|
"optional": true,
|
|
@@ -18410,7 +18978,7 @@
|
|
|
18410
18978
|
"immutable": true,
|
|
18411
18979
|
"locationInModule": {
|
|
18412
18980
|
"filename": "src/generated-structs/OptionalNextjsDistributionProps.ts",
|
|
18413
|
-
"line":
|
|
18981
|
+
"line": 49
|
|
18414
18982
|
},
|
|
18415
18983
|
"name": "publicDirEntries",
|
|
18416
18984
|
"optional": true,
|
|
@@ -19516,7 +20084,7 @@
|
|
|
19516
20084
|
"kind": "interface",
|
|
19517
20085
|
"locationInModule": {
|
|
19518
20086
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
19519
|
-
"line":
|
|
20087
|
+
"line": 45
|
|
19520
20088
|
},
|
|
19521
20089
|
"name": "PublicDirEntry",
|
|
19522
20090
|
"properties": [
|
|
@@ -19528,7 +20096,7 @@
|
|
|
19528
20096
|
"immutable": true,
|
|
19529
20097
|
"locationInModule": {
|
|
19530
20098
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
19531
|
-
"line":
|
|
20099
|
+
"line": 47
|
|
19532
20100
|
},
|
|
19533
20101
|
"name": "isDirectory",
|
|
19534
20102
|
"type": {
|
|
@@ -19543,7 +20111,7 @@
|
|
|
19543
20111
|
"immutable": true,
|
|
19544
20112
|
"locationInModule": {
|
|
19545
20113
|
"filename": "src/nextjs-build/nextjs-build.ts",
|
|
19546
|
-
"line":
|
|
20114
|
+
"line": 46
|
|
19547
20115
|
},
|
|
19548
20116
|
"name": "name",
|
|
19549
20117
|
"type": {
|
|
@@ -19554,6 +20122,6 @@
|
|
|
19554
20122
|
"symbolId": "src/nextjs-build/nextjs-build:PublicDirEntry"
|
|
19555
20123
|
}
|
|
19556
20124
|
},
|
|
19557
|
-
"version": "0.
|
|
19558
|
-
"fingerprint": "
|
|
20125
|
+
"version": "0.6.0",
|
|
20126
|
+
"fingerprint": "pFFkq0kZiIR22+vr8dHzSYSgrCGrr7EuMSFNU7NYwag="
|
|
19559
20127
|
}
|