Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
cdk-nextjs-standalone
Advanced tools
Deploy a NextJS app to AWS using CDK. Uses standalone build and output tracing.
A CDK construct to deploy a NextJS app using AWS CDK. Supported NextJs versions: >=12.3.0+ (includes 13.0.0+)
Uses the standalone output build mode.
Add the dependency esbuild@0.17.16
to your project along with cdk-nextjs-standalone
.
npm install -D esbuild@0.17.16 cdk-nextjs-standalone
import path from 'path';
import { Nextjs } from 'cdk-nextjs-standalone';
new Nextjs(this, 'Web', {
nextjsPath: './web', // relative path to nextjs project root
});
Available on Construct Hub.
We're in the #open-next channel on the Serverless Stack Discord.
Deploys a NextJs static site with server-side rendering and API support. Uses AWS lambda and CloudFront.
There is a new (since Next 12) standalone output mode which uses output tracing to generate a minimal server and static files. This standalone server can be converted into a CloudFront distribution and a lambda handler that handles SSR, API, and routing.
The CloudFront default origin first checks S3 for static files and falls back to an HTTP origin using a lambda function URL.
This approach is most compatible with new NextJs features such as ESM configuration, middleware, next-auth, and React server components ("appDir").
The unmaintained @serverless-nextjs project uses the deprecated serverless
NextJs build target which prevents the use of new features.
This construct was created to use the new standalone
output build and newer AWS features like lambda function URLs and fallback origins.
You may want to look at Serverless Stack and its NextjsSite construct for an improved developer experience if you are building serverless applications on CDK.
Built on top of open-next, which was partially built using the original core of cdk-nextjs-standalone.
Hey there, we value every new contribution a lot 🙏🏼 thank you.
Here is a short HowTo before you get started:
yarn build
after you made your changes and before you open a pull requestv3.0.0: Using open-next for building, ARM64 architecture for image handling, new build options.
v2.0.0: SST wrapper changed, lambda/assets/distribution defaults now are in the defaults
prop, refactored distribution settings into the new NextjsDistribution construct. If you are upgrading, you must temporarily remove the customDomain
on your existing 1.x.x app before upgrading to >=2.x.x because the CloudFront distribution will get recreated due to refactoring, and the custom domain must be globally unique across all CloudFront distributions. Prepare for downtime.
FAQs
Deploy a NextJS app to AWS using CDK and OpenNext.
The npm package cdk-nextjs-standalone receives a total of 0 weekly downloads. As such, cdk-nextjs-standalone popularity was classified as not popular.
We found that cdk-nextjs-standalone demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.