EACCES error when deploying to Lambda functions
See original GitHub issueBug description
Using Prisma with NestJS and PlanetScale, which is deployed to a Lambda. I have made the query engine binary available as a layer. The location of this layer is:
/opt/prisma-binary
I have set the above value as PRISMA_QUERY_ENGINE_BINARY. When I try to run a create request, I get the following error:
Invalid `this.prisma.user.create()` invocation in /var/task/src/lambda.js:482655:43 482652 throw new Error("Not found. Proceeding to create!"); 482653 } 482654 } catch (_a4) { → 482655 user = await this.prisma.user.create( spawn /opt/prisma-binary EACCES at RequestHandler.request (/var/task/src/lambda.js:123709:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async PrismaService._request (/var/task/src/lambda.js:124590:22) at async AuthService.verifyOTP (/var/task/src/lambda.js:482655:20) { code: 'EACCES', clientVersion: '3.15.2', meta: undefined }
This works locally, but gives the above error on lambda.
Running it on ARM and not the x86 machines.
How to reproduce
Source Code: core-feat-serverless.zip
Execute:
yarn install
Change the serverless.yml file to any dummy org you create in your Serverless Dashboard. then run
yarn sls deploy
Expected behavior
Lambda function should be deployed.
Prisma information
Environment & setup
- OS:
- Database:
- Node.js version:
Prisma Version
Prisma version 3.15.2
Issue Analytics
- State:
- Created a year ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
Permission denied on function Lamda - node.js - Stack Overflow
Have run through this twice now and still get same error as below so any help is appreciated. { "errorMessage": "EACCES: permission denied,...
Read more >Troubleshoot deployment issues in Lambda
When you deploy updates to your function directly with the Lambda API or with a client such ... Error: EACCES: permission denied, open...
Read more >aws-lambda: Missing `cdk.out` directory causes EACCES ...
Describe the bug When deploying a lambda.Function that uses lambda.Code.fromAsset to include an external .zip file, if the cdk.out directory ...
Read more >Top 10 Serverless Deployment Errors (and How to Fix Them)
When deploying a function whose Lambda Layer is referenced as an environment parameter, AWS SAM CLI returns a message saying the function's ......
Read more >How do I troubleshoot Invalid Permissions on Lambda ...
How do I troubleshoot Invalid Permissions on Lambda function errors from API Gateway REST APIs?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@janpio Here is the PR for it #3767
Will do. Here is the feature request #15289