mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #8659 from willthames/rds_module_connection_fix
rds_module: Fix AWS connection
This commit is contained in:
commit
b0e863b3f8
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue