Submit
Path:
~
/
/
lib
/
python2.7
/
site-packages
/
awscli
/
examples
/
s3api
/
File Content:
put-bucket-logging.rst
The example below sets the logging policy for *MyBucket*. The AWS user *user@example.com* will have full control over the log files, and all users will have access to them. First, grant S3 permission with ``put-bucket-acl``:: aws s3api put-bucket-acl --bucket MyBucket --grant-write URI=http://acs.amazonaws.com/groups/s3/LogDelivery --grant-read-acp URI=http://acs.amazonaws.com/groups/s3/LogDelivery Then apply the logging policy:: aws s3api put-bucket-logging --bucket MyBucket --bucket-logging-status file://logging.json ``logging.json`` is a JSON document in the current folder that contains the logging policy:: { "LoggingEnabled": { "TargetBucket": "MyBucket", "TargetPrefix": "MyBucketLogs/", "TargetGrants": [ { "Grantee": { "Type": "AmazonCustomerByEmail", "EmailAddress": "user@example.com" }, "Permission": "FULL_CONTROL" }, { "Grantee": { "Type": "Group", "URI": "http://acs.amazonaws.com/groups/global/AllUsers" }, "Permission": "READ" } ] } } .. note:: the ``put-bucket-acl`` command is required to grant S3's log delivery system the necessary permissions (write and read-acp permissions).
Submit
FILE
FOLDER
Name
Size
Permission
Action
abort-multipart-upload.rst
463 bytes
0644
complete-multipart-upload.rst
1550 bytes
0644
copy-object.rst
386 bytes
0644
create-bucket.rst
626 bytes
0644
create-multipart-upload.rst
596 bytes
0644
delete-bucket-cors.rst
163 bytes
0644
delete-bucket-lifecycle.rst
148 bytes
0644
delete-bucket-policy.rst
135 bytes
0644
delete-bucket-replication.rst
152 bytes
0644
delete-bucket-tagging.rst
144 bytes
0644
delete-bucket-website.rst
144 bytes
0644
delete-bucket.rst
126 bytes
0644
delete-object.rst
538 bytes
0644
delete-objects.rst
558 bytes
0644
get-bucket-acl.rst
582 bytes
0644
get-bucket-cors.rst
960 bytes
0644
get-bucket-lifecycle-configuration.rst
880 bytes
0644
get-bucket-lifecycle.rst
631 bytes
0644
get-bucket-location.rst
225 bytes
0644
get-bucket-notification-configuration.rst
489 bytes
0644
get-bucket-notification.rst
468 bytes
0644
get-bucket-policy.rst
1075 bytes
0644
get-bucket-replication.rst
667 bytes
0644
get-bucket-tagging.rst
285 bytes
0644
get-bucket-versioning.rst
195 bytes
0644
get-bucket-website.rst
300 bytes
0644
get-object-acl.rst
790 bytes
0644
get-object-torrent.rst
391 bytes
0644
get-object.rst
553 bytes
0644
head-bucket.rst
326 bytes
0644
head-object.rst
417 bytes
0644
list-buckets.rst
483 bytes
0644
list-multipart-uploads.rst
1035 bytes
0644
list-object-versions.rst
2584 bytes
0644
list-objects.rst
560 bytes
0644
list-parts.rst
1327 bytes
0644
put-bucket-acl.rst
531 bytes
0644
put-bucket-cors.rst
701 bytes
0644
put-bucket-lifecycle-configuration.rst
1405 bytes
0644
put-bucket-lifecycle.rst
1598 bytes
0644
put-bucket-logging.rst
1318 bytes
0644
put-bucket-notification-configuration.rst
1109 bytes
0644
put-bucket-notification.rst
1019 bytes
0644
put-bucket-policy.rst
1007 bytes
0644
put-bucket-replication.rst
1247 bytes
0644
put-bucket-tagging.rst
563 bytes
0644
put-bucket-versioning.rst
356 bytes
0644
put-bucket-website.rst
434 bytes
0644
put-object-acl.rst
554 bytes
0644
put-object.rst
647 bytes
0644
upload-part.rst
845 bytes
0644
N4ST4R_ID | Naxtarrr