creating Lambda lambda.setupRequestListeners
{ RequestEntityTooLargeException: Request must be smaller than 69905067 bytes for the CreateFunction operation
message: 'Request must be smaller than 69905067 bytes for the CreateFunction operation',
code: 'RequestEntityTooLargeException',
time: 2017-06-22T08:30:52.260Z,
requestId: 'xxx',
statusCode: 413,
retryable: false,
retryDelay: 89.31111557639109
}
Is my project too big or what is happening here? Can I upload it through S3 or does it have to do with the number of routes in my project?
The same deploy technique works with a smaller project that has only a couple of routes.
"scripts": {
"deploy": "claudia create --handler lambda.handler --name authService --deploy-proxy-api --region eu-central-1",
"update": "claudia update",
"generate-proxy": "claudia generate-serverless-express-proxy --express-module server",
"test": "./node_modules/.bin/mocha --reporter spec"
},
Two approaches that you can follow to test this : 1) AWS CLI Deploying function code from S3 allows for substantially larger deployment packages when compared to directly uploading to Lambda.
There are two ways to get your Lambda function’s code into AWS Lambda: either directly uploading the function’s deployment package, or having Lambda pull it from S3.
https://hackernoon.com/exploring-the-aws-lambda-deployment-limits-9a8384b0bec3
2) ClaudiaJS CLI
Read here: https://claudiajs.com/news/2016/09/21/claudia-1.9.0.html
claudia create --handler lambda.handler --deploy-proxy-api --region us-south-1 --use-s3-bucket bucket-name
thank you @Gojko for your contribution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With