PATH:
usr
/
local
/
jetapps
/
var
/
lib
/
aws
/
lib
/
python2.7
/
site-packages
/
awscli
/
examples
/
s3api
This example allows all users to retrieve any object in *MyBucket* except those in the *MySecretFolder*. It also grants ``put`` and ``delete`` permission to the root user of the AWS account ``1234-5678-9012``:: aws s3api put-bucket-policy --bucket MyBucket --policy file://policy.json policy.json: { "Statement": [ { "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::MyBucket/*" }, { "Effect": "Deny", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::MyBucket/MySecretFolder/*" }, { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::123456789012:root" }, "Action": [ "s3:DeleteObject", "s3:PutObject" ], "Resource": "arn:aws:s3:::MyBucket/*" } ] }
[-] put-bucket-policy.rst
[edit]
[-] delete-bucket.rst
[edit]
[-] put-bucket-notification-configuration.rst
[edit]
[-] delete-bucket-website.rst
[edit]
[-] put-bucket-logging.rst
[edit]
[+]
..
[-] list-buckets.rst
[edit]
[-] delete-objects.rst
[edit]
[-] list-object-versions.rst
[edit]
[-] delete-bucket-lifecycle.rst
[edit]
[-] complete-multipart-upload.rst
[edit]
[-] list-parts.rst
[edit]
[-] get-bucket-website.rst
[edit]
[-] put-bucket-lifecycle.rst
[edit]
[-] get-bucket-tagging.rst
[edit]
[-] list-multipart-uploads.rst
[edit]
[-] get-bucket-location.rst
[edit]
[-] get-bucket-cors.rst
[edit]
[-] delete-object.rst
[edit]
[-] put-object-acl.rst
[edit]
[-] copy-object.rst
[edit]
[-] upload-part.rst
[edit]
[-] put-bucket-replication.rst
[edit]
[-] create-bucket.rst
[edit]
[-] put-bucket-cors.rst
[edit]
[-] get-object.rst
[edit]
[-] abort-multipart-upload.rst
[edit]
[-] put-bucket-website.rst
[edit]
[-] get-object-torrent.rst
[edit]
[-] delete-bucket-replication.rst
[edit]
[-] delete-bucket-cors.rst
[edit]
[-] get-bucket-acl.rst
[edit]
[-] head-object.rst
[edit]
[-] head-bucket.rst
[edit]
[-] get-bucket-lifecycle.rst
[edit]
[-] get-bucket-policy.rst
[edit]
[-] delete-bucket-tagging.rst
[edit]
[-] put-object.rst
[edit]
[-] get-bucket-notification-configuration.rst
[edit]
[-] put-bucket-notification.rst
[edit]
[-] delete-bucket-policy.rst
[edit]
[-] put-bucket-lifecycle-configuration.rst
[edit]
[-] put-bucket-versioning.rst
[edit]
[-] put-bucket-tagging.rst
[edit]
[-] get-bucket-versioning.rst
[edit]
[-] create-multipart-upload.rst
[edit]
[-] get-bucket-notification.rst
[edit]
[-] put-bucket-acl.rst
[edit]
[-] get-object-acl.rst
[edit]
[-] list-objects.rst
[edit]
[-] get-bucket-replication.rst
[edit]
[-] get-bucket-lifecycle-configuration.rst
[edit]