For example, I have this code:
import boto3 s3 = boto3.resource(\'s3\') bucket = s3.Bucket(\'my-bucket-name\') # Does it exist???
Use lookup Function -> Returns None if bucket Exist
if s3.lookup(bucketName) is None: bucket=s3.create_bucket(bucketName) # Bucket Don't Exist else: bucket = s3.get_bucket(bucketName) #Bucket Exist