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

Better way to get S3 bucket owner #3

Merged
merged 1 commit into from
Jun 22, 2017
Merged

Better way to get S3 bucket owner #3

merged 1 commit into from
Jun 22, 2017

Conversation

mmorearty
Copy link

It turns out that we can just ask the bucket who its owner is, so that's much cleaner than passing in the owner as a command-line argument.

It turns out that we can just ask the bucket who its owner is, so that's
much cleaner than passing in the owner as a command-line argument.
@mmorearty mmorearty merged commit 9e13a69 into asana-master Jun 22, 2017
@mmorearty mmorearty deleted the mike-acl branch June 22, 2017 03:21
@mmorearty mmorearty restored the mike-acl branch June 22, 2017 03:34
@mmorearty mmorearty deleted the mike-acl branch June 22, 2017 03:34
@@ -200,19 +193,30 @@ public void put(String key, byte[] blob) {
putObject(key, new PutObjectRequest(bucketName, key, new ByteArrayInputStream(blob), new ObjectMetadata()));
}

private synchronized String getBucketOwner() {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does is make sense to cache this for the lifetime of the worker? Otherwise you'll be doing two round-trips to S3 for each put, right?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll fix that

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

Successfully merging this pull request may close these issues.

2 participants