Grant read and write access to Amazon S3 bucket objects
This example shows how you might create an identity-based policy that allows Read
and Write
access to objects in
a specific Amazon S3 bucket. This policy grants the permissions necessary to complete this action programmatically from the AWS API or AWS CLI. To use this policy, replace the italicized placeholder text
in the example policy with your own information.
Then, follow the directions in create a policy or edit a policy.
The s3:*Object
action uses a wildcard as part of the action name. The
AllObjectActions
statement allows the GetObject
,
DeleteObject
, PutObject
, and any other Amazon S3 action that ends with
the word "Object".
{ "Version": "2012-10-17", "Statement": [ { "Sid": "ListObjectsInBucket", "Effect": "Allow", "Action": ["s3:ListBucket"], "Resource": ["arn:aws:s3:::
bucket-name
"] }, { "Sid": "AllObjectActions", "Effect": "Allow", "Action": "s3:*Object", "Resource": ["arn:aws:s3:::bucket-name
/*"] } ] }
Note
To allow Read
and Write
access to an object in an Amazon S3 bucket
and also include additional permissions for console access, see Amazon S3: Allows read and
write access to objects in an S3 Bucket, programmatically and in the console.