Working with Amazon S3 Bucket Logging - Table of Contents

An Amazon S3 bucket can be configured to create access log records for the requests made against it. An access log record contains details about the request such as the request type, the resource with which the request worked, and the time and date that the request was processed. Server access logs give bucket owners insight into the nature of requests made by clients not under their control.

By default, server access logs are not collected for a bucket.

With S3 Browser you can easily turn on Amazon S3 Bucket Logging.

To enable Amazon S3 Bucket Logging:

  1. Select the Bucket you want to enable logging for and click Buckets -> Edit Logging Settings.
    Click buckets, edit logging settings
    Click Buckets -> Edit Logging Settings to Edit Bucket Logging Settings
  2. Bucket Logging Settings dialog will appear:
    enable amazon s3 bucket logging
    Bucket Logging Settings Dialog allows you to specify logging settings.
    Turn on Enable logging for bucket [bucketname] checkbox. Then you need to specify Target Bucket and Target Prefix.

    Target Bucket - defines the bucket, where log files will be stored. Target Bucket should be in the same region as Source Bucket. If you want to use the same bucket for log files, we recommend to specify Target Prefix, including trailing slash, to keep log files in subdirectory and avoid mixing log files with other files.

    You may select existing bucket from drop-down list, or specify new bucket name and it will be created automatically.

    Target Prefix - defines a prefix for the keys that the delivered log files will be stored under. For example if you want to use one bucket to keep log files from multiple source buckets, you may use Target Prefix to define subdirectories for each buckets' log files, i.e. Bucket1-logs/, Bucket2-logs/.
    click ok to apply bucket logging settings
    Click OK to apply bucket logging settings.
  3. Click the OK button to save bucket logging settings.
Please note, that log files does not appear immediately. There is some delay between the time when request was made and when it will appear in the logs.

To disable Amazon S3 Bucket Logging:

  1. Select the bucket, you want to disable logging for.
  2. Click Buckets->Edit Logging Settings
  3. Bucket Logging Settings Dialog will appear.
    how to disable amazon s3 bucket logging
    How to disable Amazon S3 bucket logging.
    Turn off Enable logging for bucket [bucketname] checkbox.
  4. Click the OK button to save changes.
The log files consist of a sequence of new-line delimited log records.
Here is an example of typical entries from Amazon S3 Server Access Logs.

Each log record represents one request and consists of space delimited fields described in the following table:

Field NameExample EntryDescription
Bucket Owner314423094967345b38a76d76d78c678b4The canonical user id of the owner of the source bucket.
Bucketbucket_nameThe name of the bucket that the request was processed against.
Time[14/Nov/2010:13:53:47 +0000]The time at which the request was received.
Remote IP11.22.33.44The apparent Internet address of the requester.
RequesterAnonymousThe canonical user id of the requester, or the string "Anonymous" for unauthenticated requests.
Request ID3E43423453A12F47The request ID is a string generated by Amazon S3 to uniquely identify each request.
OperationREST.GET.OBJECTEither SOAP.operation or REST.HTTP_method.resource_type.
Keys3browser/2.4.5/s3browser-2-4-5.exeThe "key" part of the request, URL encoded, or "-" if the operation does not take a key parameter.
Request-URI"GET /s3browser/2.4.5/s3browser-2-4-5.exe HTTP/1.1"The Request-URI part of the HTTP request message.
HTTP Status200The numeric HTTP status code of the response.
Error Code-The Amazon S3 Error Code, or "-" if no error occurred.
Bytes Sent543664The number of response bytes sent, excluding HTTP protocol overhead, or "-" if zero.
Object Size543664The total size of the object in question.
Total Time116The number of milliseconds the request was in flight from the server's perspective.
Turn-Around Time96The number of milliseconds that Amazon S3 spent processing your request.
Referrer"http://s3browser.com/download.php"The value of the HTTP Referrer header, if present.
User-Agent"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"The value of the HTTP User-Agent header.
Version Id-The version ID in the request, or "-" if the operation does not take a versionId parameter.
download s3 browser, bucket explorer
S3 Browser 3.3.9 Free

Powered by Amazon Web Services and Rated by CNET Editors!
 


Related Products

"Amazon Web Services", "AWS", "Amazon S3", "Amazon Simple Storage Service", "Amazon CloudFront", "CloudFront", the "Powered by Amazon Web Services" logo are trademarks of Amazon.com, Inc. or its affiliates in the United States and/or other countries.