[英]Upload/Download LARGE files to/from Lambda function using API Gateway without making any use of S3 Bucket
I'm implementing a serverless API , using:我正在实施无服务器API ,使用:
My flow is to:我的流程是:
This flow is already implemented and it's working well with small files, 10MB for uploading and 6MB for downloading.这个流程已经实现,它适用于小文件,10MB 用于上传,6MB 用于下载。 But I'm getting issues when dealing with large files as it'll be the case on many occasions.
但是在处理大文件时我遇到了问题,因为在很多情况下都会出现这种情况。 To solve such issue I'm thinking about the following flow:
为了解决这样的问题,我正在考虑以下流程:
Lambda Internal Tasks: Lambda 内部任务:
3.1 Lambda Download the file from S3 bucket. 3.1 Lambda 从 S3 存储桶下载文件。
3.2 Lambda Generate the corresponding WPK Package. 3.2 Lambda 生成对应的WPK Package。
3.3 Lambda Upload the generated WPK package into S3. 3.3 Lambda 将生成的 WPK package 上传到 S3。
3.4 Lambda returns a signed URL related to the uploaded file as a response. 3.4 Lambda 返回与上传文件相关的签名 URL 作为响应。
But my problem with such design is that it requires more than a request to get completed.但我对这种设计的问题是它需要的不仅仅是完成一个请求。 I want to do all this process in only 1 request, passing the target zip file in it and get the new zip as the response.
我只想在 1 个请求中完成所有这些过程,在其中传递目标 zip 文件并获取新的 zip 作为响应。 Any Ideas, please?
请问有什么想法吗?
My Components and Flow Diagram would be:我的组件和流程图将是:
There are a couple of things you could do if you'd like to unzip large files while keeping a serverless approach:如果您想在保持无服务器方法的同时解压缩大文件,您可以做几件事:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.