Book Image

Amazon S3 Cookbook (n)

By : Naoya Hashimoto
Book Image

Amazon S3 Cookbook (n)

By: Naoya Hashimoto

Overview of this book

Table of Contents (19 chapters)
Amazon S3 Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Walkthrough 3: To grant cross-account bucket permissions to objects without ownership


Walkthrough 1 is almost similar to walkthrough 2. The difference is that the bucket owner in Account A wants to grant permissions of its bucket to their user. However, the owner does not own all objects in the bucket and wants to allows its users to access to objects it does not own, but are instead, owned by a user in Account B. The following diagram shows how AWS Account A grants permissions to the S3 bucket, and the Admin IAM user in AWS Account A delegates permissions to a different IAM user in its account to access the objects owned by the IAM user in Account B for this walkthrough.

To summarize, what you need to do is:

  1. Create a bucket policy in Account A with two statements—one to grant cross-account permission to Account B to upload objects, and the other to allow users in Account A to access the objects in the bucket.

  2. Upload objects to the bucket owned by Account A in Account B.

  3. Update objects ACL with...