Code Monkey home page Code Monkey logo

Comments (5)

Pegasust avatar Pegasust commented on May 20, 2024 1

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.

sladg avatar sladg commented on May 20, 2024

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.

Pegasust avatar Pegasust commented on May 20, 2024

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.

sladg avatar sladg commented on May 20, 2024

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.

Pegasust avatar Pegasust commented on May 20, 2024

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:

  1. 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)
  1. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.