Merge pull request #1583 from civisanalytics/iam_accept_sts
iam: use modern helper to allow sts
This commit is contained in:
commit
3d8bf111b5
1 changed files with 2 additions and 5 deletions
|
@ -565,13 +565,10 @@ def main():
|
||||||
module.fail_json(changed=False, msg="iam_type: role, cannot currently be updated, "
|
module.fail_json(changed=False, msg="iam_type: role, cannot currently be updated, "
|
||||||
"please specificy present or absent")
|
"please specificy present or absent")
|
||||||
|
|
||||||
ec2_url, aws_access_key, aws_secret_key, region = get_ec2_creds(module)
|
region, ec2_url, aws_connect_kwargs = get_aws_connection_info(module)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
iam = boto.iam.connection.IAMConnection(
|
iam = boto.iam.connection.IAMConnection(**aws_connect_kwargs)
|
||||||
aws_access_key_id=aws_access_key,
|
|
||||||
aws_secret_access_key=aws_secret_key,
|
|
||||||
)
|
|
||||||
except boto.exception.NoAuthHandlerFound, e:
|
except boto.exception.NoAuthHandlerFound, e:
|
||||||
module.fail_json(msg=str(e))
|
module.fail_json(msg=str(e))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue