首页 > 解决方案 > Upload large files properly using AWS lambda and S3 (with existing limits)

问题描述

Current limit of AWS Lambda on post/put size request is 6mb Current limit of S3 on multipart upload is 5mb chunk size

5mb encoded file in upload request actually occupy more than 6mb, so the solution to upload chunks straightforward to lambda functions doesn't work.

How properly implement large files uploading (more than 5mb)?

After some struggles I come across to solution to use Object Expiration rules as temp files for uploading sub chunks first then after sub chunk is uploaded I upload normal chunk with provided sub chunk id to fetch it from temp files and then concatenate in lambda function uploading chunk with sub chunk to make one part at least 5mb. This solution is working, but I still have to wait when sub chunk being uploaded, so fully parallel multipart uploading solution will not work this way (we still have to wait when sub chunks will uploaded).

Any better ideas how to solve such problem with limits of S3 and AWS Lambda?

标签: node.jsamazon-s3uploadaws-lambdalimit

解决方案


推荐阅读