Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)
Did this page help you?  Yes | No |  Tell us about it...
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Go to the Kindle Store to download this guide in Kindle format.

Server Access Log Format

Important

This section describes beta functionality that is subject to change in future releases. Please provide feedback on this functionality in the Amazon S3 Developer Forum.

The server access log files consist of a sequence of new-line delimited log records. Each log record represents one request and consists of space delimited fields. The following is an example log consisting of six log records.

79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:00:38 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be 3E57427F3EXAMPLE REST.GET.VERSIONING - "GET /mybucket?versioning HTTP/1.1" 200 - 113 - 7 - "-" "S3Console/0.4" -
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:00:38 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be 891CE47D2EXAMPLE REST.GET.LOGGING_STATUS - "GET /mybucket?logging HTTP/1.1" 200 - 242 - 11 - "-" "S3Console/0.4" -
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:00:38 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be A1206F460EXAMPLE REST.GET.BUCKETPOLICY - "GET /mybucket?policy HTTP/1.1" 404 NoSuchBucketPolicy 297 - 38 - "-" "S3Console/0.4" -
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:01:00 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be 7B4A0FABBEXAMPLE REST.GET.VERSIONING - "GET /mybucket?versioning HTTP/1.1" 200 - 113 - 33 - "-" "S3Console/0.4" -
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:01:57 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be DD6CC733AEXAMPLE REST.PUT.OBJECT s3-dg.pdf "PUT /mybucket/s3-dg.pdf HTTP/1.1" 200 - - 4406583 41754 28 "-" "S3Console/0.4" -
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be mybucket [06/Feb/2014:00:03:21 +0000] 192.0.2.3 79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be BC3C074D0EXAMPLE REST.GET.VERSIONING - "GET /mybucket?versioning HTTP/1.1" 200 - 113 - 28 - "-" "S3Console/0.4" -

Note

Any field can be set to "-" to indicate that the data was unknown or unavailable, or that the field was not applicable to this request.

The following table describes the log record fields.

Field NameExample EntryNotes
Bucket Owner
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be
The canonical user id of the owner of the source bucket.
Bucket
mybucket
The name of the bucket that the request was processed against. If the system receives a malformed request and cannot determine the bucket, the request will not appear in any server access log.
Time
[06/Feb/2014:00:00:38 +0000]
The time at which the request was received. The format, using strftime() terminology, is [%d/%b/%Y:%H:%M:%S %z]
Remote IP
192.0.2.3
The apparent Internet address of the requester. Intermediate proxies and firewalls might obscure the actual address of the machine making the request.
Requester
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be
The canonical user id of the requester, or the string "Anonymous" for unauthenticated requests. This identifier is the same one used for access control purposes.
Request ID
3E57427F33A59F07
The request ID is a string generated by Amazon S3 to uniquely identify each request.
Operation
REST.PUT.OBJECT
Either SOAP.operation, REST.HTTP_method.resource_type or WEBSITE.HTTP_method.resource_type
Key
/photos/2014/08/puppy.jpg
The "key" part of the request, URL encoded, or "-" if the operation does not take a key parameter.
Request-URI
"GET /mybucket/photos/2014/08/puppy.jpg?x-foo=bar"
The Request-URI part of the HTTP request message.
HTTP status
200
The numeric HTTP status code of the response.
Error Code
NoSuchBucket
The Amazon S3 Error Code, or "-" if no error occurred.
Bytes Sent
2662992
The number of response bytes sent, excluding HTTP protocol overhead, or "-" if zero.
Object Size
3462992
The total size of the object in question.
Total Time
70
The number of milliseconds the request was in flight from the server's perspective. This value is measured from the time your request is received to the time that the last byte of the response is sent. Measurements made from the client's perspective might be longer due to network latency.
Turn-Around Time
10
The number of milliseconds that Amazon S3 spent processing your request. This value is measured from the time the last byte of your request was received until the time the first byte of the response was sent.
Referrer
"http://www.amazon.com/webservices"
The value of the HTTP Referrer header, if present. HTTP user-agents (e.g. browsers) typically set this header to the URL of the linking or embedding page when making a request.
User-Agent
"curl/7.15.1"
The value of the HTTP User-Agent header.
Version Id
3HL4kqtJvjVBH40Nrjfkd
The version ID in the request, or "-" if the operation does not take a versionId parameter.

Custom Access Log Information

You can include custom information to be stored in the access log record for a request by adding a custom query-string parameter to the URL for the request. Amazon S3 will ignore query-string parameters that begin with "x-", but will include those parameters in the access log record for the request, as part of the Request-URI field of the log record. For example, a GET request for "s3.amazonaws.com/mybucket/photos/2014/08/puppy.jpg?x-user=johndoe" will work the same as the same request for "s3.amazonaws.com/mybucket/photos/2014/08/puppy.jpg", except that the "x-user=johndoe" string will be included in the Request-URI field for the associated log record. This functionality is available in the REST interface only.

Programming Considerations for Extensible Server Access Log Format

From time to time, we might extend the access log record format by adding new fields to the end of each line. Code that parses server access logs must be written to handle trailing fields that it does not understand.

Additional Logging for Copy Operations

A copy operation involves a GET and a PUT. For that reason, we log two records when performing a copy operation. The previous table describes the fields related to the PUT part of the operation. The following table describes the fields in the record that relate to the GET part of the copy operation.

Field NameExample EntryNotes
Bucket Owner
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be
The canonical user id of the bucket that stores the object being copied.
Bucket
mybucket
The name of the bucket that stores the object being copied.
Time
[06/Feb/2014:00:00:38 +0000]
The time at which the request was received. The format, using strftime() terminology, is [%d/%B/%Y:%H:%M:%S %z]
Remote IP
192.0.2.3
The apparent Internet address of the requester. Intermediate proxies and firewalls might obscure the actual address of the machine making the request.
Requester
79a59df900b949e55d96a1e698fbacedfd6e09d98eacf8f8d5218e7cd47ef2be
The canonical user id of the requester, or the string "Anonymous" for unauthenticated requests. This identifier is the same one used for access control purposes.
Request ID
3E57427F33A59F07
The request ID is a string generated by Amazon S3 to uniquely identify each request.
Operation
REST.COPY.OBJECT_GET
Either SOAP.operation, REST.HTTP_method.resource_type or WEBSITE.HTTP_method.resource_type
Key
/photos/2014/08/puppy.jpg
The "key" of the object being copied or "-" if the operation does not take a key parameter.
Request-URI
"GET /mybucket/photos/2014/08/puppy.jpg?x-foo=bar"
The Request-URI part of the HTTP request message.
HTTP status
200
The numeric HTTP status code of the GET portion of the copy operation.
Error Code
NoSuchBucket
The Amazon S3 Error Code, of the GET portion of the copy operation or "-" if no error occurred.
Bytes Sent
2662992
The number of response bytes sent, excluding HTTP protocol overhead, or "-" if zero.
Object Size
3462992
The total size of the object in question.
Total Time
70
The number of milliseconds the request was in flight from the server's perspective. This value is measured from the time your request is received to the time that the last byte of the response is sent. Measurements made from the client's perspective might be longer due to network latency.
Turn-Around Time
10
The number of milliseconds that Amazon S3 spent processing your request. This value is measured from the time the last byte of your request was received until the time the first byte of the response was sent.
Referrer
"http://www.amazon.com/webservices"
The value of the HTTP Referrer header, if present. HTTP user-agents (e.g. browsers) typically set this header to the URL of the linking or embedding page when making a request.
User-Agent
"curl/7.15.1"
The value of the HTTP User-Agent header.
Version Id
3HL4kqtJvjVBH40Nrjfkd
The version ID of the object being copied or "-" if the x-amz-copy-source header didn’t specify a versionId parameter as part of the copy source.