# Error while using ansible with aws

**URL:** <https://forum.ansible.com/t/error-while-using-ansible-with-aws/21776>\
**Category:** Ansible Project\
**Tags:** aws\
**Created:** [June 14, 2016, 5:25pm UTC](https://forum.ansible.com/t/error-while-using-ansible-with-aws/21776 "2016-06-14T17:25:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![challa.tek](https://avatars.discourse-cdn.com/v4/letter/c/b38774/32.png) [@challa.tek](https://forum.ansible.com/u/challa.tek)\
**Post date:** [June 14, 2016, 5:25pm UTC](https://forum.ansible.com/t/error-while-using-ansible-with-aws/21776/1 "2016-06-14T17:25:14Z")

</div>

i am using ansible 2.1.0.0, when i execute a playbook against ec2 console i am finding this error  
Error:

FAILED! =\> {“changed”: false, “failed”: true, “invocation”: {“module\_args”: {“assign\_public\_ip”: false, “aws\_access\_key”: null, “aws\_region”: “us-east-1”, “aws\_secret\_key”: null, “count”: 1, “count\_tag”: null, “ebs\_optimized”: false, “ec2\_url”: null, “exact\_count”: null, “group”: null, “group\_id”: null, “id”: null, “image”: null, “instance\_ids”: [“i-ba508d26”, “i-bda01c21”], “instance\_profile\_name”: null, “instance\_tags”: null, “instance\_type”: null, “kernel”: null, “key\_name”: null, “monitoring”: false, “network\_interfaces”: null, “placement\_group”: null, “private\_ip”: null, “profile”: null, “ramdisk”: null, “region”: “us-east-1”, “security\_token”: null, “source\_dest\_check”: true, “spot\_launch\_group”: null, “spot\_price”: null, “spot\_type”: “one-time”, “spot\_wait\_timeout”: “600”, “state”: “running”, “tenancy”: “default”, “termination\_protection”: false, “user\_data”: null, “validate\_certs”: true, “volumes”: null, “vpc\_subnet\_id”: null, “wait”: false, “wait\_timeout”: “300”, “zone”: null}, “module\_name”: “ec2”}, “msg”: “No handler was ready to authenticate. 1 handlers were checked. [‘HmacAuthV4Handler’] Check your credentials”}

[![](https://lh3.googleusercontent.com/-vm3BhzWytBI/V2A94HN5CTI/AAAAAAAAAAM/YyopgP6HSF4mSW5_VQvwEGQNLBW2UqjygCLcB/s320/bashrc.PNG)](https://lh3.googleusercontent.com/-vm3BhzWytBI/V2A94HN5CTI/AAAAAAAAAAM/YyopgP6HSF4mSW5_VQvwEGQNLBW2UqjygCLcB/s1600/bashrc.PNG)

[![](https://lh3.googleusercontent.com/-79_FCYXrHig/V2A963xTE5I/AAAAAAAAAAU/RTPZnR6t_DEtXE9c-nUr_5ogzttIb-TwACLcB/s320/Capture%2B1.PNG)](https://lh3.googleusercontent.com/-79_FCYXrHig/V2A963xTE5I/AAAAAAAAAAU/RTPZnR6t_DEtXE9c-nUr_5ogzttIb-TwACLcB/s1600/Capture%2B1.PNG)

it seems like it is happening because of environment variables not set properly but i have set the environment variables and still not working with environment variables set up in my .bashrc file.
