Skip to content

Instantly share code, notes, and snippets.

View AgnijDave's full-sized avatar
🏠
Working from home

Agnij Dave AgnijDave

🏠
Working from home
View GitHub Profile
@AgnijDave
AgnijDave / S3Buckets.py
Created December 11, 2020 04:15
Python Boto3 Implementation with AWS Lambdas
s3 = boto3.resource('s3')
bucket = s3.Bucket('xyz_bucket')
your_bucketname = 'xyz_bucket'
## CHECK WHETHER A BUCKET EXISTS
if bucket.creation_date:
print('It Already Exists')
else:
try:
## This snippet will either create a new bucket or return the already existing bucket present in your account