# AWS was not able to validate the provided access credentials

**URL:** <https://forum.ansible.com/t/aws-was-not-able-to-validate-the-provided-access-credentials/26524>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [January 22, 2018, 12:10am UTC](https://forum.ansible.com/t/aws-was-not-able-to-validate-the-provided-access-credentials/26524 "2018-01-22T00:10:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hrf](https://avatars.discourse-cdn.com/v4/letter/h/85f322/32.png) [@hrf](https://forum.ansible.com/u/hrf)\
**Post date:** [January 22, 2018, 12:10am UTC](https://forum.ansible.com/t/aws-was-not-able-to-validate-the-provided-access-credentials/26524/1 "2018-01-22T00:10:48Z")

</div>

I am running a ansible script with ansible 2.4.2 to create a security and it works fine if I run the script for region us-east-1 but if I go against region us-west-2 it fails with

TASK [create the LB security group] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ClientError: An error occurred (AuthFailure) when calling the DescribeSecurityGroups operation: AWS was not able to validate the provided access credentials  
fatal: [localhost]: FAILED! =\> {“changed”: false, “error”: {“code”: “AuthFailure”, “message”: “AWS was not able to validate the provided access credentials”}, “msg”: “Error in describe\_security\_groups: An error occurred (AuthFailure) when calling the DescribeSecurityGroups operation: AWS was not able to validate the provided access credentials”, “response\_metadata”: {“http\_headers”: {“date”: “Sun, 21 Jan 2018 23:53:14 GMT”, “server”: “AmazonEC2”, “transfer-encoding”: “chunked”}, “http\_status\_code”: 401, “request\_id”: “d8bf5548-54ab-4bd6-b4dd-bfeb61ebc03c”, “retry\_attempts”: 0}}  
to retry, use: --limit @/Users/hrf/jelli/devops/provision/ansible/aws\_asg.retry

If I run this script using ansible 2.3.2 it works fine with region us-east-1 and us-west-2. I have tried setting the ENV variables ( with my credentials but that does not seem to matter. I am running on Macbook with MacOS 10.13.2 and I have installed ansible using pip. I have upgrade to the latest boto and boto3.
