Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
This is a super hacky script for deleting objects one by one on a restricted s3 bucket
import boto3
boto3.setup_default_session(profile_name='dev')
client = boto3.client('s3')
def delete_object(key_name):
return client.delete_object(Bucket='s3_bucket', Key=key_name )
delete_object('bad_image.jpg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.