Closed ralcorta closed 1 year ago
I've facing the same error, do anyone know how to solve this? I'm just starting my project, so its size is pretty small.
Somehow I was able to make it work by removing my current stack sls remove
and deploying it again, hope it could give a clue on the root cause.
Here's another solution that worked for me:
1) before adding the serverless-layer plugin to your serverless.yml
, add the following to deploy without the node_modules, and deploy it (the lambdas will not function until you complete step 2):
package:
patterns:
- "!node_modules/**"
2) Add the serverless-layer plugin back in and deploy again:
plugins:
- serverless-layers
If we try : https://www.serverless.com/framework/docs/providers/aws/guide/deploying
provider:
name: aws
deploymentMethod: direct
deploymentPrefix: test
Is that possible solution ?? Like change default artifacts location ?? Is that workaround solution ??
When I use the package, I got this error:
Unzipped size must be smaller than 262144000 bytes
Script:
sls deploy --verbose -s production
Complete Error
Serverles.yml config (I'm using .ts but for better understanding)
package.json
From what I can see the layer formed by node_modules does not weigh more than 250 MB. According to the zip this is the size of 160.9 MB