How Do I Enable Server Access Logging for an S3 Bucket?
If you are in the old Amazon S3 console, to use the new console, choose Opt In in the following box, which appears on the old Amazon S3 console home page. Note that Opt In is not available in all Regions.
Server access logging provides detailed records for the requests made to a bucket. Server access logs are useful for many applications because they give bucket owners insight into the nature of requests made by clients not under their control. By default, Amazon Simple Storage Service (Amazon S3) doesn't collect server access logs. This topic describes how to enable logging for a bucket. For more information, see Server Access Logging in the Amazon Simple Storage Service Developer Guide.
When you enable logging, Amazon S3 delivers access logs to a target bucket that you choose. An access log record contains details about the requests made to a bucket. This can include the request type, the resources specified in the request, and the time and date the request was processed. For more information, see Server Access Log Format in the Amazon Simple Storage Service Developer Guide.
There is no extra charge for enabling server access logging on an Amazon S3 bucket. However, any log files that the system delivers to you will accrue the usual charges for storage. (You can delete the log files at any time.) We do not assess data transfer charges for log file delivery, but we do charge the normal data transfer rate for accessing the log files.
To enable server access logging for an S3 bucket
Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.
In the Bucket name list, choose the name of the bucket that you want to enable server access logging for.
Choose Enable Logging. For Target, choose the name of the bucket that you want to receive the log record objects.
(Optional) For Target prefix, type a key name prefix for log objects, so that all of the log objects begin with the same string.