Skip to content

Clarification on S3 API #3256

Answered by RanVaknin
tzmanlfg asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @tzmanlfg!

When you upload an object to an S3 bucket you may want to verify that the bucket to which you are uploading is actually the intended bucket. This may come in handy as a 'self check' when you are writing to multiple buckets owned by different accounts.

You can do so by passing in an ExpectedBucketOwner in the form of the intended owner id, thus making sure your object ends up where it was intended to go. If there is a discrepancy between the intended destination and the actual destination, the request will fail with a 403 error.

Here is an official doc describing what Ive just explained with a real life example.

Please let me know if this answers your question.
Cheers!

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by RanVaknin
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
guidance General information and guidance, answers to FAQs, or recommended best practices/resources.
2 participants