cycloidio / raws

[UNMAINTAINED] AWS Reader
MIT License
15 stars 0 forks source link

S3: fetch only buckets from the right region #40

Closed xlr-8 closed 5 years ago

xlr-8 commented 5 years ago

Currently the AWS API would return all buckets with a simple ListBuckets call. Whether from the cli or the go-sdk. To filter those buckets out or sort them properly, calls to HeadBucket or GetBucketLocation might be require.

But that would drastically slow down the fetching of buckets, as you'd have to make n+1 calls to the API. 1 to fetch them, and n to determine their region.