download free 30 days trial version buy bucket explorer
Documentation  Download  Purchase  Support  FAQs   Forum   ScreenShots & Demos

How to Disable Logging on CloudFront Distribution (PUT Distribution Config)-CloudFront Logging?

If you already have enabled CloudFront Logging to deliver access logs per distribution to an Amazon S3 bucket, and when you request to remove CloudFront Logging on distribution, Amazon CloudFront stops writing detailed log information into an Amazon S3 bucket that you have specified. If you disable logging, Amazon CloudFront does not delete the log files already delivered to you. You will need to delete log files by yourself from the Bucket.

You can remove CloudFront Logging on distribution, by sending Http PUT Distribution Config Request, in one of the two ways explained below:

  1. Remove Logging Using PUT Distribution: If you are a programmer, you can write your own code to remove CloudFront Logging from distribution using PUT Distribution Config API.
  2. Remove Logging Using Bucket Explorer: If you do not want to write code, you can easily Remove Logging with Bucket Explorer using mouse clicks.

A. Remove Logging Using PUT Distribution

You can do PUT request to update distribution with logging <Enabled> value FALSE . For example, to disable logging in streaming distribution-


PUT /2013-05-12/streaming-distribution/ distribution Id /config HTTP/1.1
Host: cloudfront.amazonaws.com
If-Match: value from ETag header in previous GET response
Authorization: AWS authentication string
Other required headers

<?xml version="1.0" encoding="UTF-8"?>
<StreamingDistributionConfig>
<Logging>
<Enabled> false </Enabled>
<Bucket> Amazon S3 bucket for logs </Bucket>
<Prefix> prefix for log file names </Prefix>
</Logging>
. . . <REMAINING XML Doc>
</StreamingDistributionConfig>
 

B. Simple steps to remove distribution logging using Bucket Explorer

Follow the steps below to Remove CloudFront Logging

  1. Run Bucket Explorer.
  2. Click on  Distribution  button located in bucket toolbar.
  3. It will open a List Distribution window.
  4. Select any row from the list of distributions.
  5. Click on remove Logging .
  6. It will ask you to remove logging for the selected bucket.
  7. Click ‘Yes’ to remove logging from the selected bucket.