[英]AWS S3 Muitipart Upload via API Gateway or Lambda
I'm trying to create a reusable large-file serverless upload service in AWS (we host a number of sites). 我正在尝试在AWS(我们托管许多站点)中创建可重用的大文件无服务器上载服务。 What I would like to do is to set up an API Gateway in AWS and use CORS to control which sites can upload, allowing the sites to use client-side code. 我想做的是在AWS中设置一个API网关,并使用CORS来控制哪些网站可以上传,从而允许这些网站使用客户端代码。 Here is what I've tried and the roadblocks I've run into. 这是我尝试过的以及遇到的障碍。 Wondering if anybody has any suggested workarounds? 想知道是否有人有任何建议的解决方法?
Any ideas? 有任何想法吗? Is any of these worth digging into? 这些值得一探吗? Or is serverless a no-go for this use case? 还是对于这种用例而言,无服务器是难事吗?
So, after further follow-up with Amazon, it's sort-of possible to use pre-signed URLs with the multipart API, but it's not very practical. 因此,在对Amazon进行进一步跟进之后,可以将预先签名的URL与multipart API结合使用,但这不是很实用。 Steps involved would include the following: 涉及的步骤包括:
Will accept Angelo's answer since it did point in this direction which, technically, seems possible 将接受安杰洛的回答,因为它确实指出了这个方向,从技术上讲,这似乎是可能的
You might be able to use presigned urls for the upload. 您也许可以使用预先签名的网址进行上传。 In this case the client would hit your API, which would do whatever validation is necessary, and then generated a presigned url to S3 that is returned to the client. 在这种情况下,客户端将访问您的API,该API将执行所需的任何验证,然后生成指向S3的预签名URL,并将其返回给客户端。 The client then directly uploads to s3. 然后,客户端直接上传到s3。
You can see some information here: https://sanderknape.com/2017/08/using-pre-signed-urls-upload-file-private-s3-bucket/ 您可以在此处查看一些信息: https : //sanderknape.com/2017/08/using-pre-signed-urls-upload-file-private-s3-bucket/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.