Im trying to deploy AWS Lambda a very simple project using Apollo, Nexus/Schema and Prisma.
But Im bumping on the size of the project, what surprises me because it is very simple, with only one table.
Digging up the problem I discovered that the size of nexus-plugin-prisma it is the cause of the problem.

Someone faced similar problem?
same issue here, even the basic project won't deploy to lambda because of the package size and nexus-plugin-prisma is the main contributor to that.
If you're using serverless framework, then I was able to work around this excluding unneeded files:
package: # Optional deployment packaging configuration
include: # Specify the directories and files which should be included in the deployment package
- dist/**
- node_modules
- '!node_modules/.prisma/client/query-engine-darwin'
- '!node_modules/.prisma/client/query-engine-debian-openssl-1.1.x'
- '!node_modules/@types/**'
- '!node_modules/@prisma/cli/introspection-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/cli/introspection-engine-darwin'
- '!node_modules/@prisma/cli/migration-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/cli/migration-engine-darwin'
- '!node_modules/@prisma/cli/prisma-fmt-debian-openssl-1.1.x'
- '!node_modules/@prisma/cli/prisma-fmt-darwin'
- '!node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/cli/query-engine-darwin'
- '!node_modules/@prisma/sdk/prisma-fmt-debian-openssl-1.1.x'
- '!node_modules/@prisma/sdk/prisma-fmt-darwin'
- '!node_modules/@prisma/sdk/migration-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/sdk/migration-engine-darwin'
- '!node_modules/@prisma/sdk/introspection-engine-darwin'
- '!node_modules/@prisma/sdk/introspection-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/sdk/query-engine-debian-openssl-1.1.x'
- '!node_modules/@prisma/sdk/query-engine-darwin'
- '!node_modules/aws-sdk/**'
exclude: # Specify the directories and files which should be excluded in the deployment package
- src/**
@kokokenada wow, this looks awesome!
Thanx!
@kokokenada you should be able to drop the entire !node_modules/@prisma/cli directory.
Most helpful comment
same issue here, even the basic project won't deploy to lambda because of the package size and nexus-plugin-prisma is the main contributor to that.