Skip to content

Commit

Permalink
Add AWS_REGION as an option you can submit to the s3 connection
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jun 20, 2017
1 parent a91d159 commit d89bba0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bakery/management/commands/__init__.py
Expand Up @@ -31,6 +31,8 @@ def get_s3_client():
protocol,
settings.AWS_S3_HOST
)
if hasattr(settings, "AWS_REGION"):
s3_kwargs['region_name'] = settings.AWS_REGION
s3_client = boto3.client('s3', **s3_kwargs)
s3_resource = boto3.resource('s3', **s3_kwargs)
return s3_client, s3_resource
Expand Down

0 comments on commit d89bba0

Please sign in to comment.