Use Boto3 to Recover Deleted Files in AWS S3 Bucket

Recover Deleted Files

So it happened. One of our techs ‘accidentally’ deleted all the directories and files in one of our S3 buckets. I enabled S3 Bucket Versioning on all our important buckets. So the deleted files are still there with the ‘latest version’ of the file being a Delete Marker. If you… Continue reading

Using Python Boto3 with Amazon AWS S3 Buckets

I’m here adding some additional Python Boto3 examples, this time working with S3 Buckets. So to get started, lets create the S3 resource, client, and get a listing of our buckets. import boto3 s3 = boto3.resource(‘s3’) s3client = boto3.client(‘s3’) response = s3client.list_buckets() for bucket in response[“Buckets”]: print(bucket[‘Name’]) Here we create… Continue reading