prisma / prisma-examples

🚀 Ready-to-run Prisma example projects
https://www.prisma.io/docs/
Apache License 2.0
6.15k stars 1.43k forks source link

example aws-lambda no longer working #3308

Open tobkle opened 3 years ago

tobkle commented 3 years ago

Local Environment:

OSX: Monterey 12.0.1 (M1)
Node: v15.5.0
Framework Core: 2.65.0
Plugin: 5.5.1
SDK: 4.3.0
Components: 3.17.2

Tried to get this approach from prisma docu working. But it looks like the original aws-lambda example is deprecated:

  1. There is no query-engine-*

    package:
    patterns:
    - '!node_modules/.prisma/client/query-engine-*'
    - 'node_modules/.prisma/client/query-engine-rhel-*'

    ... but a libquery-engine-*. So I assume serverless.yml should contain the following instead:

    package:
    patterns:
        - "!node_modules/.prisma/client/libquery-engine-*"
        - "node_modules/.prisma/client/libquery-engine-rhel-*"
  2. That file libquery_engine-rhel-openssl-1.0.x.so.node has a size of 44 MB. This in turn lead to the following error during sls deploy:

    Serverless Error ----------------------------------------
    
    An error occurred: GetUsersLambdaFunction - Resource handler returned message: 
    "Unzipped size must be smaller than 262144000 bytes" 
    (Service: Lambda, Status Code: 400, HandlerErrorCode: InvalidRequest).

Has anyone a working aws-lambda prisma example setup, which is working?

Tried that article, but it isn't working any more. It is refering this 2 year old example, which sounds promising, but so far I couldn't get it deployed.

janpio commented 3 years ago

Have a look at this currently open PR that updates the pattern: https://github.com/prisma/docs/pull/2477 Can you confirm it works with this one?