s3 = boto.connect_s3()
bucket = s3.create_bucket('versioned.example.com')
bucket.configure_versioning(True)
key = bucket.new_key('versioned_object')
key.set_contents_from_string('Version 1')
key.set_contents_from_string('Version 2')
bucket.delete()
bucket.delete_key('versioned_object')
bucket.delete()
list(bucket.list())
list(bucket.list_versions())
for version in bucket.list_versions():
    bucket.delete_key(version.name, version_id=version.version_id)
list(bucket.list_versions())
bucket.delete()
How to delete a s3 version from a bucket using boto and python