[AWS] Allow the profile to take precedence to allow better compatibility between ~/.boto and ~/.aws/credential files (#45806)

This commit is contained in:
Sloane Hertel 2018-11-06 14:30:54 -05:00 committed by GitHub
parent 4ec2423a04
commit e1aa05bf9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -285,6 +285,7 @@ def get_aws_connection_info(module, boto3=False):
boto_params['verify'] = validate_certs
if profile_name:
boto_params = dict(aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None)
boto_params['profile_name'] = profile_name
else: