This is a super hacky script for deleting objects one by one on a restricted s3 bucket
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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