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 4: Bucket and user policy examples


This section introduces more practical examples to configure complex policies specifying actions, buckets, or conditions based on several realistic scenarios.

Getting ready

Through the walkthroughs, you learned about the concept of bucket policies and user policies, how to configure bucket policies to Amazon S3 bucket and user policies to IAM users, and how bucket policies and user policies work together.

This section focuses on bucket policy examples and their structure based on common use cases. We will be looking into the following bucket policy examples:

  • Granting permissions to multiple accounts, specific resources, and addresses in a bucket policy

  • Allowing a user to access a folder in a bucket in a specific region in a user policy

How to do it…

The first scenario is where we want to allow a specific user in the AWS accounts to access two buckets configuring a bucket policy, the actions only Put and Get for the bucket and only from specific networks...