in cloudformation/solution-assistant/src/lambda_fn.py [0:0]
def delete_s3_bucket(bucket_name):
s3_resource = boto3.resource("s3")
try:
s3_resource.Bucket(bucket_name).delete()
print("Successfully deleted bucket " "called '{}'.".format(bucket_name))
except s3_resource.meta.client.exceptions.NoSuchBucket:
print("Could not find bucket called '{}'. " "Skipping delete.".format(bucket_name))