From 0083212704994d2329c32bcea99c4ea657c8ee6c Mon Sep 17 00:00:00 2001 From: Will Thames Date: Mon, 18 Aug 2014 14:35:36 +1000 Subject: [PATCH] Fix RDS AWS connection Use the common AWS connection improvements so that security_token, boto_profile etc. are taken into account --- library/cloud/rds | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library/cloud/rds b/library/cloud/rds index 2853d354ac4..ba3f1e38d39 100644 --- a/library/cloud/rds +++ b/library/cloud/rds @@ -353,13 +353,13 @@ def main(): apply_immediately = module.params.get('apply_immediately') new_instance_name = module.params.get('new_instance_name') - ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module) + region, ec2_url, aws_connect_params = get_aws_connection_info(module) if not region: module.fail_json(msg = str("region not specified and unable to determine region from EC2_REGION.")) # connect to the rds endpoint try: - conn = boto.rds.connect_to_region(region, aws_access_key_id=aws_access_key, aws_secret_access_key=aws_secret_key) + conn = connect_to_aws(boto.rds, region, **aws_connect_params) except boto.exception.BotoServerError, e: module.fail_json(msg = e.error_message)