Search code examples
aws-sdk-go

Looking for an optimized way of getting s3 info (for eg, policy) across regions


I need to get properties of all S3 buckets across all regions, is there a single SDK api which can achieve this? As i end up creating per region session and calling s3 apis with those new sessions.

  • Using ListBuckets, get the buckets list
  • GetBucketLocation will give the location/region
  • Create session per region
  • Then make a s3 query using these new sessions per region.

Solution

  • There is no single API. Your approach is reasonable, but slow, unless you fire off a different thread for each session/region.