s3.getBucketRegion
instead of inheriting bucket region from env var ref #7
with help from @GretaCB all tests are passing, including a new one for our new function. we also tested this IRL and successfully sent a message affecting an object in us-east-1 bucket to the dg-utils queue in us-west-2. feeling good about this pr. @yhahn or @rclark would you mind taking a look at this before merge?
Looks good -- one thing we may want to look into doing is caching the bucket => region lookup in a way similar to how we cache the bucket => sns topic lookup (https://github.com/mapbox/s3touch/blob/master/index.js#L30).
Otherwise we'll be looking up the bucket location on every sns message we send.
Let me know if you want pointers on this -- the easiest way to implement this would be to create a bucketRegionCache object or so and have the bucketRegion function check that first to see if we know a bucket's region already (otherwise, do the api call you're doing now and cache the result).
Worked through caching scenario with @yhahn, have updated the written tests & have tested IRL. Messages continue to send properly.