title: AWS CLI delete cloudfront distribution - InvalidIfMatchVersion
body: <p>I am trying to delete a cloudfront distribution via the AWS CLI. Doing</p>
  
  <pre><code>aws cloudfront delete-distribution --id &lt;DISTRIBUTION-ID&gt;
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>A client error (InvalidIfMatchVersion) occurred when calling the DeleteDistribution operation: 
  The If-Match version is missing or not valid for the resource.
  </code></pre>
  
  <p>I do not quite understand, what this error means and how to get around it. </p>
  
  <p>From <a href="http://docs.aws.amazon.com/AmazonCloudFront/2012-03-15/APIReference/DeleteDistribution.html" rel="noreferrer">this documentation</a> I assume, that it is necessary to <em>disable</em> the distribution first. But if so - how do I to do this with the CLI? </p>