Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

s3.getBucketRegion #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

s3.getBucketRegion #8

wants to merge 4 commits into from

Conversation

camillacaros
Copy link

instead of inheriting bucket region from env var
ref #7

@camillacaros
Copy link
Author

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?

@yhahn
Copy link
Member

yhahn commented Sep 24, 2015

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).

@camillacaros
Copy link
Author

Worked through caching scenario with @yhahn, have updated the written tests & have tested IRL. Messages continue to send properly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants