Menu
Amazon Simple Storage Service
Developer Guide (API Version 2006-03-01)

(Optional) Configuring Web Traffic Logging

If you want to track the number of visitors accessing your website, enable logging for the root domain bucket. Enabling logging is optional.

First, you the example.com root domain bucket, the logs.example.com bucket, and the www.example.com subdomain bucket. Be sure to create these buckets in the same AWS Region where you created the example.com bucket. Amazon S3 stores log information about traffic to your website in the logs.example.com bucket.

Next, create two folders in the logs.example.com bucket; one named root, and the other named cdn. If you configure CloudFront to speed up your website, you will use the cdn folder. In this procedure, we show how to create the root folder.

To enable logging for your root domain bucket

  1. Open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the Buckets pane, choose your root domain bucket, choose Properties, and then choose Logging.

  3. In the Logging pane, complete the following steps:

    1. Select the Enabled check box.

    2. For Target Bucket, choose the bucket that you created for the log files, logs.example.com.

    3. For Target Prefix, type root/. This setting groups the log data files in the bucket in a folder named root so that they are easy to locate.

    4. Choose Save.