Model reference

The following models should be the only thing you need interact with in your project code.


The S3LogRecord class represents a single access log entry. The following fields are available for querying.

bucket_owner:(CharField) The canonical id of the owner of the source bucket.
bucket:(ForeignKey – S3LoggedBucket) The bucket that the request was processed against.
request_dtime:(DateTimeField) The time at which the request was received.
remote_ip:(IPAddressField) The apparent Internet address of the requester. Intermediate proxies and firewalls might obscure the actual address of the machine making the request.
requester:(CharField, nullable) 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:(CharField) A string generated by Amazon S3 to uniquely identify each request.
operation:(CharField) Either SOAP.<operation> or REST.<HTTP_method.resource_type>.
key:(TextField) The ‘key’ part of the request, URL encoded, or ‘-‘ if the operation does not take a key parameter.
request_method:(CharField, nullable) The method used to retrieve the file. Typically either GET or POST.
request_uri:(TextField) The Request-URI part of the HTTP request message.
http_version:(CharField, nullable) HTTP version used in the request. Typically HTTP/1.0 “or HTTP/1.1.”
http_status:(PositiveIntegerField) The HTTP response code for the request.
error_code:(CharField, nullable) The Amazon S3 Error Code, or ‘-‘ if no error occurred.”)
bytes_sent:(PositiveIntegerField, nullable) The number of response bytes sent, excluding HTTP protocol overhead, or ‘-‘ if zero.
object_size:(PositiveIntegerField, nullable) The total size of the object in question.
total_time:(PositiveIntegerField, nullable) 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.
 (PositiveIntegerField, nullable) 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:(TextField, nullable) 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:(TextField, nullable) The value of the HTTP User-Agent header.
version_id:(CharField, nullable) The version ID in the request, or ‘-‘ if the operation does not take a versionId parameter.


The S3LoggedBucket class represents a bucket that is being logged.

name:(CharField) The name of the bucket that is being logged. This is where the media that is being served resides.
 (CharField) The S3 bucket to monitor for log keys. This must be a separate bucket from the logged bucket. The contents of this bucket must only be log files.
monitor_bucket:(BooleanField) When checked, pull logs from this bucket’s log bucket.

Table Of Contents

Previous topic


This Page