可以在单个请求中从Amazon S3获取多个对象吗? [英] Possible to get multiple object from Amazon S3 in single request?

查看:81
本文介绍了可以在单个请求中从Amazon S3获取多个对象吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Amazon-S3上有一些小文件,想知道是否可以在单个请求中获得3-4个小文件.

Have a few small files on Amazon-S3 and wondering if it's possible to get 3-4 of them in a single request.

环顾了文档和少量SDK,没有发现任何明显的内容.我看到他们现在有了多次删除"功能,这很不错,但是多重获取会很棒

Looked around docs and few SDK's and didn't find anything obvious. I saw they now have "multi-delete", which is nice, but multi get would be great

有人知道这样的事情是可能的吗?

Anyone know of something like this is possible?

谢谢

推荐答案

如果您查看最低级别的文档(例如REST API),则对对象的GET操作只会为每个请求带来一个对象,因此无论如何您发现在任何一个AWS开发工具包中都会出现此类请求的循环.

If you take a look to the lowest level documentation (REST API, for example), the GET operation on objects brings you only one object per request, so whatever you find out in any of AWS SDKs will be a loop over this kind of request.

有些工具可以使下载多个对象变得更加容易.例如,在命令行工具中:
s3cmd get object1 object2 object3 s3://bucket-name
该调用将发出顺序请求,这意味着不会减少总时间,但确实使您的任务更容易完成.

There are some tools that make it easier to download more than one object. For example, in command-line tools:
s3cmd get object1 object2 object3 s3://bucket-name
This call will make sequential requests, meaning the total time won't be reduced, but it indeed makes your task easier to accomplish.

如果您更喜欢以编程方式进行操作,建议您使用对您的平台更有意义的SDK,并且,如果该SDK还不包含批处理GET对象操作,请根据自己的喜好实现自己的版本.

If you prefer doing it in a programmatic way, I suggest using whichever SDK that makes more sense for your platform, and, if it does not contain a batch GET object operation yet, implement your own version according to your own preferences.

这篇关于可以在单个请求中从Amazon S3获取多个对象吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆