prisma-examples icon indicating copy to clipboard operation
prisma-examples copied to clipboard

example aws-lambda no longer working

Open tobkle opened this issue 3 years ago • 1 comments

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-*"
  1. 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.

tobkle avatar Nov 07 '21 12:11 tobkle

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?

janpio avatar Nov 08 '21 10:11 janpio