ronypal
ronypal

Reputation: 11

how to set permissions to a single file in a bucket for amazon aws using java

I have setup a bucket and an object key under it, using grantree. How do we set the permissions to a specific user? I tried acl.grantPermission(new CanonicalGrantee("example canonicaluserid"), Permission.ReadAcp);

Upvotes: 0

Views: 100

Answers (1)

user846969
user846969

Reputation:

Use IAM under Amazon Web Services. You will essentially: create a user, give the user appropriate permissions, create an access key and secret for that user, use this key/secret combination in your code.

Upvotes: 1

Related Questions