title: Delete all versions of an object in S3 using python?
body: <p>I have a versioned bucket and would like to delete the object (and all of its versions) from the bucket. However, when I try to delete the object from the console, S3 simply adds a delete marker but does not perform a hard delete. </p>
  
  <p>Is it possible to delete all versions of the object (hard delete) with a particular key?:</p>
  
  <pre><code>s3resource = boto3.resource('s3')
  bucket = s3resource.Bucket('my_bucket')
  obj = bucket.Object('my_object_key')
  
  # I would like to delete all versions for the object like so:
  obj.delete_all_versions()
  
  # or delete all versions for all objects like so:
  bucket.objects.delete_all_versions()
  </code></pre>