summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Laccetti <mlaccetti@uncharted.software>2015-02-25 08:46:13 -0500
committerMichael Laccetti <mlaccetti@uncharted.software>2015-02-25 08:46:13 -0500
commit60e2e43f003ab14f33936ba4aee19699d60db546 (patch)
tree3dc23c573453b4babf8001913a1a80bb7d336739
parent58534d0c7168a6d8fa37e7b9354aa5b0f707d86e (diff)
downloadansible-modules-core-60e2e43f003ab14f33936ba4aee19699d60db546.tar.gz
Change s3 to use connect_to_region
* Allows us to use Ansible/s3 for GovCloud when accessing a pre-existing bucket
-rw-r--r--cloud/amazon/s3.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloud/amazon/s3.py b/cloud/amazon/s3.py
index 7b914dd9..f3f6e222 100644
--- a/cloud/amazon/s3.py
+++ b/cloud/amazon/s3.py
@@ -339,7 +339,8 @@ def main():
module.fail_json(msg = str(e))
else:
try:
- s3 = boto.connect_s3(aws_access_key, aws_secret_key)
+ from boto.s3.connection import OrdinaryCallingFormat
+ s3 = boto.s3.connect_to_region(location, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key, is_secure=True, calling_format=OrdinaryCallingFormat())
except boto.exception.NoAuthHandlerFound, e:
module.fail_json(msg = str(e))