Comments (5)
I'm going to close this issue as approach 2 gives me a deployment to AWS.
Thank you for this project! You're the GOAT.
from nextjs-lambda.
Hey! You can obtain them programmatically.
import { sharpLayerZipPath, imageHandlerZipPath, serverHandlerZipPath, nextLayerZipPath } from '@sladg/nextjs-lambda'
This will give you resolved path of these ZIPs on your disk (points to place inside node_modules).
from nextjs-lambda.
I gave this a try sometime earlier and it seems AWS CDK did a silent error (say that there is no update to my empty stack).
Will give it a try sometime today and report back!
from nextjs-lambda.
Yeah! I faced the same problem with CDK not updating properly when being imported from the package.
I suggest either going for next-utils deploy
command (documentation just got updated) or copying the CDK code to your app.
from nextjs-lambda.
Thanks for the pointer to next-utils deploy
! It's exactly what I missed.
Couple more nitpicky errors and we should be good to go:
❌ Deployment failed: Error: Stack Deployments Failed: Error: "--require-approval" is enabled and stack includes security-sensitive updates, but terminal (TTY) is not
attached so we are unable to get a confirmation from the user
at deployStacks (/home/ubuntu_admin/local_repos/c4c-monorepo-addon/node_modules/.pnpm/[email protected]/node_modules/aws-cdk/lib/deploy.ts:61:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CdkToolkit.deploy (/home/ubuntu_admin/local_repos/c4c-monorepo-addon/node_modules/.pnpm/[email protected]/node_modules/aws-cdk/lib/cdk-toolkit.ts:312:7)
at initCommandLine (/home/ubuntu_admin/local_repos/c4c-monorepo-addon/node_modules/.pnpm/[email protected]/node_modules/aws-cdk/lib/cli.ts:349:12)
Stack Deployments Failed: Error: "--require-approval" is enabled and stack includes security-sensitive updates, but terminal (TTY) is not attached so we are unable to
get a confirmation from the user
at ChildProcess.exithandler (node:child_process:398:12)
at ChildProcess.emit (node:events:527:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
I think there are 2 ways we can fix this:
- Change this line to perform synchronous call with stdin and stdout pipe
- currently, when running
next-utils deploy
, it blocks the output until it's done (might not be ideal)
- Tell the user to put their root
cdk.json
to have"requireApproval": "never"
as documented here
- I'm testing this approach. It's still blocking the output for a long while without any output (for around 5-7 minutes, which is scary for users)
from nextjs-lambda.
Related Issues (20)
- Allow for use of `www` HOT 1
- Migrate to programatic aws-cdk
- Update certficate contruct HOT 1
- Specify lambda node runtime via cli HOT 3
- Specify Profile for CDK to use HOT 5
- Hotswap CLI flag breaks first deploy HOT 2
- Support for Cloudfront Alternate Domain Names HOT 2
- [FR] Allow to bypass Route53 DNS record. HOT 4
- [FR] Implement ISR HOT 5
- Forward the Host header to the origin HOT 6
- API Cache not Setting Correctly HOT 2
- Packaging doesn't include index.html? HOT 1
- Process failed with error: Error: Public folder assets must be nested in public/assets folder HOT 2
- Dependency upgrade HOT 1
- `config.json` 's body is just `nextConfig`, not valid JSON. HOT 1
- Getting the response body returned with Base64 encoded with `compress: false` HOT 7
- wrong version from `--version` HOT 1
- Deploy via CDK requires extra dependencies HOT 5
- EOL announcement HOT 2
- API calls to _next/data fails with a 404 in standalone deployment with AWS Lambda HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-lambda.