David Whatley
David Whatley

Reputation: 392

How to restrict Amazon S3 API access?

Is there a way to create a different identity to (access key / secret key) to access Amazon S3 buckets via the REST API where I can restrict access (read only for example)?

Upvotes: 8

Views: 6462

Answers (3)

Skyler Johnson
Skyler Johnson

Reputation: 3873

The recommended way is to use IAM to create a new user, then apply a policy to that user.

Upvotes: 9

Dick Chesterwood
Dick Chesterwood

Reputation: 2659

Check out the details at http://docs.amazonwebservices.com/AmazonS3/2006-03-01/dev/index.html?UsingAuthAccess.html (follow the link to "Using Query String Authentication")- this is a subdocument to the one Greg Posted, and describes how to generate access URLs on the fly.

This uses a hashed form of the private key and allows expiration, so you can give brief access to files in a bucket without allowed unfettered access to the rest of the S3 store.

Constructing the REST URL is quite difficult, it took me about 3 hours of coding to get it right, but this is a very powerful access technique.

Upvotes: 1

Greg Hewgill
Greg Hewgill

Reputation: 993085

Yes, you can. The S3 API documentation describes the Authentication and Access Control services available to you. You can set up a bucket so that another Amazon S3 account can read but not modify items in the bucket.

Upvotes: 4

Related Questions