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
}
是我的项目太大还是这里发生了什么?我可以通过 S3 上传它还是与我的项目中的路由数量有关?
相同的部署技术适用于只有几个路由的较小项目。
我正在通过这些命令使用 claudia.js:
"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"
},
最佳答案
您可以采用两种方法对此进行测试: 1) 命令行界面 与直接上传到 Lambda 相比,从 S3 部署函数代码允许使用更大的部署包。
有两种方法可以将 Lambda 函数的代码导入 AWS Lambda:直接上传函数的部署包,或者让 Lambda 从 S3 中提取它。
https://hackernoon.com/exploring-the-aws-lambda-deployment-limits-9a8384b0bec3
2) ClaudiaJS 命令行工具
阅读这里: 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 桶名
感谢@Gojko 的贡献。
关于node.js - AWS Lambda setupRequestListerners RequestEntityTooLargeException claudia.js,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44694263/