Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, aws_access_key_id, aws_secret_access_key, bucket_name, bucket_region, location, **kwargs):
if not S3Storage.is_valid_region(bucket_region):
eprint('\'{}\' region is not valid for S3'.format(bucket_region))
sys.exit(-1)
self.TYPE = 's3'
self.AWS_ACCESS_KEY_ID = aws_access_key_id
self.AWS_SECRET_ACCESS_KEY = aws_secret_access_key
self.BUCKET_NAME = bucket_name
self.BUCKET_REGION = bucket_region
self.LOCATION = location