# s3 Unable to locate credentials

**URL:** <https://forum.ansible.com/t/s3-unable-to-locate-credentials/26363>\
**Category:** Ansible Project\
**Tags:** ubuntu\
**Created:** [December 21, 2017, 6:20pm UTC](https://forum.ansible.com/t/s3-unable-to-locate-credentials/26363 "2017-12-21T18:20:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Scancella](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@John\_Scancella](https://forum.ansible.com/u/John_Scancella)\
**Post date:** [December 21, 2017, 6:20pm UTC](https://forum.ansible.com/t/s3-unable-to-locate-credentials/26363/1 "2017-12-21T18:20:57Z")

</div>

Hello,

No matter what I do, I can’t seem to get the aws\_s3 module to work, it keeps complaining that it can’t find credentials. Yet I have them set via my environment variables

`

[jscancella@johns-air chronam-deployment (master)]$ ansible-playbook -vvv foo.yml --vault-password-file get\_vault\_password.sh  
ansible-playbook 2.4.2.0  
config file = /Users/jscancella/development/repos/chronam-deployment/ansible.cfg  
configured module search path = [u’/Users/jscancella/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/Cellar/ansible/2.4.2.0\_1/libexec/lib/python2.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-playbook  
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]  
Using /Users/jscancella/development/repos/chronam-deployment/ansible.cfg as config file  
Parsed /etc/ansible/hosts inventory source with ini plugin

PLAYBOOK: foo.yml \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
2 plays in foo.yml  
Read vars\_file ‘variables.yml’  
Read vars\_file ‘variables.yml’

PLAY [localhost] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Read vars\_file ‘variables.yml’

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Using module file /usr/local/Cellar/ansible/2.4.2.0\_1/libexec/lib/python2.7/site-packages/ansible/modules/system/setup.py  
\<127.0.0.1\> ESTABLISH LOCAL CONNECTION FOR USER: jscancella  
\<127.0.0.1\> EXEC /bin/sh -c ‘/usr/local/Cellar/ansible/2.4.2.0\_1/libexec/bin/python2.7 && sleep 0’  
ok: [localhost]  
META: ran handlers  
Read vars\_file ‘variables.yml’

TASK [Add new instance to host group] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /Users/jscancella/development/repos/chronam-deployment/foo.yml:13  
creating host via ‘add\_host’: [hostname=ec2-174-129-95-211.compute-1.amazonaws.com](http://hostname=ec2-174-129-95-211.compute-1.amazonaws.com)  
changed: [localhost] =\> {  
“add\_host”: {  
“groups”: [  
“django\_instances”  
],  
“host\_name”: “[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)”,  
“host\_vars”: {}  
},  
“changed”: true  
}  
META: ran handlers  
META: ran handlers  
Read vars\_file ‘variables.yml’  
Read vars\_file ‘variables.yml’

PLAY [Configure django servers] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Read vars\_file ‘variables.yml’

TASK [Gathering Facts] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Using module file /usr/local/Cellar/ansible/2.4.2.0\_1/libexec/lib/python2.7/site-packages/ansible/modules/system/setup.py  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> ESTABLISH SSH CONNECTION FOR USER: ubuntu  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/Users/jscancella/.ssh/jscalocgov.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -o ControlPath=/Users/jscancella/.ansible/cp/74732c7634 [ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com) ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> (0, ‘exc: 'DistributionFiles' object has no attribute 'parse\_distribution\_file\_Archlinux'\n\n{“invocation”: {“module\_args”: {“filter”: “\*”, “gather\_subset”: [“all”], “fact\_path”: “/etc/ansible/facts.d”, “gather\_timeout”: 10}}, “ansible\_facts”: {“ansible\_product\_serial”: “NA”, “ansible\_form\_factor”: “Other”, “ansible\_distribution\_file\_parsed”: true, “ansible\_fips”: false, “ansible\_service\_mgr”: “upstart”, “ansible\_user\_id”: “ubuntu”, “ansible\_selinux\_python\_present”: false, “ansible\_userspace\_bits”: “64”, “ansible\_ssh\_host\_key\_rsa\_public”: “AAAAB3NzaC1yc2EAAAADAQABAAABAQDNVbhM+jE8EH6k0NCU/+2ZqjPhosAMe57oGZQQDKz9kvZFCiI9Yj1rFeTRjyl1Z5xlhQPjX7m8KFzO09m2Q52MfmcDbnhzBJHHL4d5ddnHCdlPL7sSiUPEQa9d32pTRl8rnEFEFbBdN/HJr2nz40s806p0l92BU8Nuy7n61CqtKwUk2WHILbg63kjGrewOEvNoXrepM+kgfBoyg1z1WF6rlavwUrjsl3U3d89D41q5Yh7Sfc69LL5/jtXp4iWw1hiWMr5W71w7lM2eBxbEqpRDL4aBiZBKaHJVgqn/Za809pkk356UxeSiwBVQZgdpEdjvfUH1KU+LKscTcUZL/9g7”, “gather\_subset”: [“all”], “ansible\_real\_user\_id”: 1000, “ansible\_architecture”: “x86\_64”, “ansible\_local”: {}, “ansible\_distribution\_version”: “14.04”, “ansible\_domain”: “ec2.internal”, “ansible\_distribution\_file\_path”: “/etc/os-release”, “ansible\_user\_shell”: “/bin/bash”, “ansible\_date\_time”: {“weekday\_number”: “4”, “iso8601\_basic\_short”: “20171221T171317”, “tz”: “UTC”, “weeknumber”: “51”, “hour”: “17”, “year”: “2017”, “minute”: “13”, “tz\_offset”: “+0000”, “month”: “12”, “epoch”: “1513876397”, “iso8601\_micro”: “2017-12-21T17:13:17.789922Z”, “weekday”: “Thursday”, “time”: “17:13:17”, “date”: “2017-12-21”, “iso8601”: “2017-12-21T17:13:17Z”, “day”: “21”, “iso8601\_basic”: “20171221T171317789867”, “second”: “17”}, “ansible\_ssh\_host\_key\_ed25519\_public”: “AAAAC3NzaC1lZDI1NTE5AAAAIDyvPWevvIjZsMAnTqj442m/IZ4RDPtr4CMf5I0Tktbe”, “ansible\_processor\_cores”: 8, “ansible\_virtualization\_role”: “guest”, “ansible\_distribution\_file\_variety”: “Debian”, “ansible\_env”: {“LANG”: “en\_US.UTF-8”, “SHELL”: “/bin/bash”, “XDG\_RUNTIME\_DIR”: “/run/user/1000”, “MAIL”: “/var/mail/ubuntu”, “SHLVL”: “1”, “SSH\_CLIENT”: “140.147.246.218 60029 22”, “PWD”: “/home/ubuntu”, “LOGNAME”: “ubuntu”, “USER”: “ubuntu”, “HOME”: “/home/ubuntu”, “PATH”: “/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games”, “SSH\_CONNECTION”: “140.147.246.218 60029 172.31.43.164 22”, “XDG\_SESSION\_ID”: “15”, “\_”: “/bin/sh”}, “ansible\_effective\_group\_id”: 1000, “ansible\_bios\_version”: “4.2.amazon”, “ansible\_processor”: [“0”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “1”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “2”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “3”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “4”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “5”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “6”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”, “7”, “GenuineIntel”, “Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz”], “ansible\_virtualization\_type”: “xen”, “ansible\_lo”: {“features”: {“tx\_checksum\_ipv4”: “off [fixed]”, “generic\_receive\_offload”: “on”, “tx\_checksum\_ipv6”: “off [fixed]”, “tx\_scatter\_gather\_fraglist”: “on [fixed]”, “rx\_all”: “off [fixed]”, “highdma”: “on [fixed]”, “rx\_fcs”: “off [fixed]”, “tx\_lockless”: “on [fixed]”, “tx\_tcp\_ecn\_segmentation”: “on”, “tx\_tcp6\_segmentation”: “on”, “tx\_gso\_robust”: “off [fixed]”, “tx\_ipip\_segmentation”: “off [fixed]”, “tx\_checksumming”: “on”, “vlan\_challenged”: “on [fixed]”, “loopback”: “on [fixed]”, “fcoe\_mtu”: “off [fixed]”, “tx\_checksum\_sctp”: “off [fixed]”, “tx\_vlan\_stag\_hw\_insert”: “off [fixed]”, “rx\_vlan\_stag\_hw\_parse”: “off [fixed]”, “rx\_vlan\_stag\_filter”: “off [fixed]”, “large\_receive\_offload”: “off [fixed]”, “tx\_scatter\_gather”: “on [fixed]”, “rx\_checksumming”: “on [fixed]”, “tx\_tcp\_segmentation”: “on”, “netns\_local”: “on [fixed]”, “generic\_segmentation\_offload”: “on”, “tx\_udp\_tnl\_segmentation”: “off [fixed]”, “tcp\_segmentation\_offload”: “on”, “l2\_fwd\_offload”: “off [fixed]”, “rx\_vlan\_offload”: “off [fixed]”, “ntuple\_filters”: “off [fixed]”, “tx\_vlan\_offload”: “off [fixed]”, “tx\_nocache\_copy”: “off [fixed]”, “tx\_mpls\_segmentation”: “off [fixed]”, “udp\_fragmentation\_offload”: “on”, “scatter\_gather”: “on”, “tx\_sit\_segmentation”: “off [fixed]”, “tx\_checksum\_fcoe\_crc”: “off [fixed]”, “tx\_checksum\_ip\_generic”: “on [fixed]”, “tx\_fcoe\_segmentation”: “off [fixed]”, “rx\_vlan\_filter”: “off [fixed]”, “receive\_hashing”: “off [fixed]”, “tx\_gre\_segmentation”: “off [fixed]”}, “hw\_timestamp\_filters”: , “mtu”: 65536, “device”: “lo”, “promisc”: false, “timestamping”: [“rx\_software”, “software”], “ipv4”: {“broadcast”: “host”, “netmask”: “255.0.0.0”, “network”: “127.0.0.0”, “address”: “127.0.0.1”}, “ipv6”: [{“scope”: “host”, “prefix”: “128”, “address”: “::1”}], “active”: true, “type”: “loopback”}, “ansible\_memtotal\_mb”: 32175, “ansible\_ssh\_host\_key\_ecdsa\_public”: “AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBCmXFhofz132TrLX4jgHKfWF0aCOcdedMelSb9x6I0hsvxLHdQDW6Eh6H+h1zjpnkzSu9rIrrk3cKXeKBFfYJbE=”, “ansible\_device\_links”: {“masters”: {}, “labels”: {“xvda1”: [“cloudimg-rootfs”]}, “ids”: {}, “uuids”: {“xvda1”: [“79ad9722-c80b-40bf-8e5b-b757a3c09589”]}}, “ansible\_default\_ipv4”: {“macaddress”: “0e:00:69:b9:d2:8a”, “network”: “172.31.32.0”, “mtu”: 9001, “broadcast”: “172.31.47.255”, “alias”: “eth0”, “netmask”: “255.255.240.0”, “address”: “172.31.43.164”, “interface”: “eth0”, “type”: “ether”, “gateway”: “172.31.32.1”}, “ansible\_swapfree\_mb”: 0, “ansible\_default\_ipv6”: {}, “ansible\_distribution\_release”: “trusty”, “ansible\_system\_vendor”: “Xen”, “ansible\_apparmor”: {“status”: “enabled”}, “ansible\_cmdline”: {“BOOT\_IMAGE”: “/boot/vmlinuz-3.13.0-119-generic”, “ro”: true, “root”: “UUID=79ad9722-c80b-40bf-8e5b-b757a3c09589”, “console”: “ttyS0”}, “ansible\_effective\_user\_id”: 1000, “ansible\_user\_gid”: 1000, “ansible\_selinux”: {“status”: “Missing selinux Python library”}, “ansible\_product\_version”: “4.2.amazon”, “ansible\_os\_family”: “Debian”, “ansible\_userspace\_architecture”: “x86\_64”, “ansible\_product\_uuid”: “NA”, “ansible\_system”: “Linux”, “ansible\_pkg\_mgr”: “apt”, “ansible\_memfree\_mb”: 31037, “ansible\_devices”: {“ram14”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram15”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram12”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram13”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram10”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram11”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram8”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram9”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram4”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram5”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram6”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram7”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram0”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram1”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram2”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “ram3”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “131072”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “4096”, “model”: null, “partitions”: {}, “holders”: , “size”: “64.00 MB”}, “loop4”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop3”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop2”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop1”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop0”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop7”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop6”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “loop5”: {“scheduler\_mode”: “”, “rotational”: “1”, “vendor”: null, “sectors”: “0”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {}, “holders”: , “size”: “0.00 Bytes”}, “xvda”: {“scheduler\_mode”: “deadline”, “rotational”: “0”, “vendor”: null, “sectors”: “20971520”, “links”: {“masters”: , “labels”: , “ids”: , “uuids”: }, “sas\_device\_handle”: null, “sas\_address”: null, “virtual”: 1, “host”: “”, “sectorsize”: “512”, “removable”: “0”, “support\_discard”: “0”, “model”: null, “partitions”: {“xvda1”: {“sectorsize”: 512, “uuid”: “79ad9722-c80b-40bf-8e5b-b757a3c09589”, “links”: {“masters”: , “labels”: [“cloudimg-rootfs”], “ids”: , “uuids”: [“79ad9722-c80b-40bf-8e5b-b757a3c09589”]}, “sectors”: “20948760”, “start”: “16065”, “holders”: , “size”: “9.99 GB”}}, “holders”: , “size”: “10.00 GB”}}, “ansible\_user\_uid”: 1000, “ansible\_memory\_mb”: {“real”: {“total”: 32175, “used”: 1138, “free”: 31037}, “swap”: {“cached”: 0, “total”: 0, “free”: 0, “used”: 0}, “nocache”: {“used”: 331, “free”: 31844}}, “ansible\_distribution”: “Ubuntu”, “ansible\_user\_dir”: “/home/ubuntu”, “ansible\_dns”: {“nameservers”: [“172.31.0.2”], “search”: [“ec2.internal”]}, “ansible\_distribution\_major\_version”: “14”, “module\_setup”: true, “ansible\_processor\_count”: 8, “ansible\_hostname”: “ip-172-31-43-164”, “ansible\_processor\_vcpus”: 8, “ansible\_swaptotal\_mb”: 0, “ansible\_lsb”: {“release”: “14.04”, “major\_release”: “14”, “codename”: “trusty”, “id”: “Ubuntu”, “description”: “Ubuntu 14.04.5 LTS”}, “ansible\_real\_group\_id”: 1000, “ansible\_bios\_date”: “08/24/2006”, “ansible\_all\_ipv6\_addresses”: [“fe80::c00:69ff:feb9:d28a”], “ansible\_interfaces”: [“lo”, “eth0”], “ansible\_uptime\_seconds”: 5365, “ansible\_machine\_id”: “348ea5faa5d196b75cbd2321591cb6ad”, “ansible\_kernel”: “3.13.0-119-generic”, “ansible\_user\_gecos”: “Ubuntu”, “ansible\_system\_capabilities\_enforced”: “True”, “ansible\_python”: {“executable”: “/usr/bin/python”, “version”: {“micro”: 6, “major”: 2, “releaselevel”: “final”, “serial”: 0, “minor”: 7}, “type”: “CPython”, “has\_sslcontext”: false, “version\_info”: [2, 7, 6, “final”, 0]}, “ansible\_processor\_threads\_per\_core”: 1, “ansible\_fqdn”: “ip-172-31-43-164.ec2.internal”, “ansible\_mounts”: [{“block\_used”: 461869, “uuid”: “N/A”, “size\_total”: 10423046144, “block\_total”: 2544689, “mount”: “/”, “block\_available”: 2082820, “size\_available”: 8531230720, “fstype”: “ext4”, “inode\_total”: 655360, “options”: “rw,discard”, “device”: “/dev/xvda1”, “inode\_used”: 71371, “block\_size”: 4096, “inode\_available”: 583989}], “ansible\_eth0”: {“macaddress”: “0e:00:69:b9:d2:8a”, “features”: {“tx\_checksum\_ipv4”: “on”, “generic\_receive\_offload”: “on”, “tx\_checksum\_ipv6”: “on”, “tx\_scatter\_gather\_fraglist”: “off [fixed]”, “rx\_all”: “off [fixed]”, “highdma”: “on [fixed]”, “rx\_fcs”: “off [fixed]”, “tx\_lockless”: “off [fixed]”, “tx\_tcp\_ecn\_segmentation”: “off [fixed]”, “tx\_tcp6\_segmentation”: “on”, “tx\_gso\_robust”: “off [fixed]”, “tx\_ipip\_segmentation”: “off [fixed]”, “tx\_checksumming”: “on”, “vlan\_challenged”: “off [fixed]”, “loopback”: “off [fixed]”, “fcoe\_mtu”: “off [fixed]”, “tx\_checksum\_sctp”: “off [fixed]”, “tx\_vlan\_stag\_hw\_insert”: “off [fixed]”, “rx\_vlan\_stag\_hw\_parse”: “off [fixed]”, “rx\_vlan\_stag\_filter”: “off [fixed]”, “large\_receive\_offload”: “off [fixed]”, “tx\_scatter\_gather”: “on”, “rx\_checksumming”: “on”, “tx\_tcp\_segmentation”: “on”, “netns\_local”: “off [fixed]”, “generic\_segmentation\_offload”: “on”, “tx\_udp\_tnl\_segmentation”: “off [fixed]”, “tcp\_segmentation\_offload”: “on”, “l2\_fwd\_offload”: “off [fixed]”, “rx\_vlan\_offload”: “on [fixed]”, “ntuple\_filters”: “off [fixed]”, “tx\_vlan\_offload”: “on [fixed]”, “tx\_nocache\_copy”: “on”, “tx\_mpls\_segmentation”: “off [fixed]”, “udp\_fragmentation\_offload”: “off [fixed]”, “scatter\_gather”: “on”, “tx\_sit\_segmentation”: “off [fixed]”, “tx\_checksum\_fcoe\_crc”: “off [fixed]”, “tx\_checksum\_ip\_generic”: “off [fixed]”, “tx\_fcoe\_segmentation”: “off [fixed]”, “rx\_vlan\_filter”: “on [fixed]”, “receive\_hashing”: “off [fixed]”, “tx\_gre\_segmentation”: “off [fixed]”}, “type”: “ether”, “pciid”: “0000:00:03.0”, “module”: “ixgbevf”, “mtu”: 9001, “device”: “eth0”, “promisc”: false, “timestamping”: [“rx\_software”, “software”], “ipv4”: {“broadcast”: “172.31.47.255”, “netmask”: “255.255.240.0”, “network”: “172.31.32.0”, “address”: “172.31.43.164”}, “ipv6”: [{“scope”: “link”, “prefix”: “64”, “address”: “fe80::c00:69ff:feb9:d28a”}], “active”: true, “speed”: 10000, “hw\_timestamp\_filters”: }, “ansible\_nodename”: “ip-172-31-43-164”, “ansible\_product\_name”: “HVM domU”, “ansible\_machine”: “x86\_64”, “ansible\_system\_capabilities”: [“”], “ansible\_ssh\_host\_key\_dsa\_public”: “AAAAB3NzaC1kc3MAAACBAPDDRi28MvwQhO+xh2N069O6lraDhKzNW5QvwA6Q06wzeb+DQmMK4y8YxHKDXzLzmhfXGqfs3pc4u8g+w5USxisAh5SCJbQrT0dw/x4nMZoyEQ9LJVL0qfRVmhliuf29L9A6XaKqNIxi4WxV206OGN9g+ljQRoqV5fa0yttbrYErAAAAFQD+0/67HpW24Rfx2BAd6xBvoy3KdwAAAIAuyrGYFGl/kmP0KqU1yfgC/Q5e5eJxPTFz1jaLvo7950da5nZF0FmPSbLQw1LzwkxoikMamAkOh9ClQN3k3reJHpv6IViC1zvjL5/mDAOjoAFVEnqr6c8IKF6ukJMa8dsC9Gi5UgDeUJwNMhSQ1FnojtHegHgCp0KR6Dfd37s68AAAAIA1F5+exWPJkiXZCn0ZHSHBRmeYzAsNRxFb2bRTrWyGC2RAq5u00mW4Y73M2nNDvdtz+btKUZjzHNhQWOAIYFzEt8K+ButsH8UQUs08YNOqWQeuiY+uamkN9JsCuLh1YrNudZJUx0tbJ/udidWQuGh2bTFxfQTdhqizeN0hmdlK3Q==”, “ansible\_all\_ipv4\_addresses”: [“172.31.43.164”], “ansible\_python\_version”: “2.7.6”}}\n’, ‘’)  
ok: [[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)]  
META: ran handlers  
Read vars\_file ‘variables.yml’

TASK [copy aware binary] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
task path: /Users/jscancella/development/repos/chronam-deployment/foo.yml:27  
Using module file /usr/local/Cellar/ansible/2.4.2.0\_1/libexec/lib/python2.7/site-packages/ansible/modules/cloud/amazon/aws\_s3.py  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> ESTABLISH SSH CONNECTION FOR USER: ubuntu  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> SSH: EXEC ssh -C -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/Users/jscancella/.ssh/jscalocgov.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 -o ControlPath=/Users/jscancella/.ansible/cp/74732c7634 [ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com) ‘/bin/sh -c ‘"’"’/usr/bin/python && sleep 0’“'”‘’  
\<[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)\> (1, ‘’, ‘Traceback (most recent call last):\n File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 829, in \n main()\n File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 659, in main\n bucketrtn = bucket\_check(module, s3, bucket, validate=validate)\n File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 290, in bucket\_check\n s3.head\_bucket(Bucket=bucket)\n File “/usr/local/lib/python2.7/dist-packages/botocore/client.py”, line 317, in \_api\_call\n return self.\_make\_api\_call(operation\_name, kwargs)\n File “/usr/local/lib/python2.7/dist-packages/botocore/client.py”, line 602, in \_make\_api\_call\n operation\_model, request\_dict)\n File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 143, in make\_request\n return self.\_send\_request(request\_dict, operation\_model)\n File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 168, in \_send\_request\n request = self.create\_request(request\_dict, operation\_model)\n File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 152, in create\_request\n operation\_name=operation\_model.name)\n File “/usr/local/lib/python2.7/dist-packages/botocore/hooks.py”, line 227, in emit\n return self.\_emit(event\_name, kwargs)\n File “/usr/local/lib/python2.7/dist-packages/botocore/hooks.py”, line 210, in \_emit\n response = handler(\*\*kwargs)\n File “/usr/local/lib/python2.7/dist-packages/botocore/signers.py”, line 90, in handler\n return self.sign(operation\_name, request)\n File “/usr/local/lib/python2.7/dist-packages/botocore/signers.py”, line 154, in sign\n auth.add\_auth(request)\n File “/usr/local/lib/python2.7/dist-packages/botocore/auth.py”, line 420, in add\_auth\n super(S3SigV4Auth, self).add\_auth(request)\n File “/usr/local/lib/python2.7/dist-packages/botocore/auth.py”, line 352, in add\_auth\n raise NoCredentialsError\nbotocore.exceptions.NoCredentialsError: Unable to locate credentials\n’)  
The full traceback is:  
Traceback (most recent call last):  
File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 829, in   
main()  
File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 659, in main  
bucketrtn = bucket\_check(module, s3, bucket, validate=validate)  
File “/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py”, line 290, in bucket\_check  
s3.head\_bucket(Bucket=bucket)  
File “/usr/local/lib/python2.7/dist-packages/botocore/client.py”, line 317, in \_api\_call  
return self.\_make\_api\_call(operation\_name, kwargs)  
File “/usr/local/lib/python2.7/dist-packages/botocore/client.py”, line 602, in \_make\_api\_call  
operation\_model, request\_dict)  
File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 143, in make\_request  
return self.\_send\_request(request\_dict, operation\_model)  
File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 168, in \_send\_request  
request = self.create\_request(request\_dict, operation\_model)  
File “/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py”, line 152, in create\_request  
operation\_name=operation\_model.name)  
File “/usr/local/lib/python2.7/dist-packages/botocore/hooks.py”, line 227, in emit  
return self.\_emit(event\_name, kwargs)  
File “/usr/local/lib/python2.7/dist-packages/botocore/hooks.py”, line 210, in \_emit  
response = handler(\*\*kwargs)  
File “/usr/local/lib/python2.7/dist-packages/botocore/signers.py”, line 90, in handler  
return self.sign(operation\_name, request)  
File “/usr/local/lib/python2.7/dist-packages/botocore/signers.py”, line 154, in sign  
auth.add\_auth(request)  
File “/usr/local/lib/python2.7/dist-packages/botocore/auth.py”, line 420, in add\_auth  
super(S3SigV4Auth, self).add\_auth(request)  
File “/usr/local/lib/python2.7/dist-packages/botocore/auth.py”, line 352, in add\_auth  
raise NoCredentialsError  
botocore.exceptions.NoCredentialsError: Unable to locate credentials

fatal: [[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com)]: FAILED! =\> {  
“changed”: false,  
“module\_stderr”: “Traceback (most recent call last):\n File "/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py", line 829, in \n main()\n File "/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py", line 659, in main\n bucketrtn = bucket\_check(module, s3, bucket, validate=validate)\n File "/tmp/ansible\_gbMwg9/ansible\_module\_aws\_s3.py", line 290, in bucket\_check\n s3.head\_bucket(Bucket=bucket)\n File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 317, in \_api\_call\n return self.\_make\_api\_call(operation\_name, kwargs)\n File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 602, in \_make\_api\_call\n operation\_model, request\_dict)\n File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 143, in make\_request\n return self.\_send\_request(request\_dict, operation\_model)\n File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 168, in \_send\_request\n request = self.create\_request(request\_dict, operation\_model)\n File "/usr/local/lib/python2.7/dist-packages/botocore/endpoint.py", line 152, in create\_request\n operation\_name=operation\_model.name)\n File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 227, in emit\n return self.\_emit(event\_name, kwargs)\n File "/usr/local/lib/python2.7/dist-packages/botocore/hooks.py", line 210, in \_emit\n response = handler(\*\*kwargs)\n File "/usr/local/lib/python2.7/dist-packages/botocore/signers.py", line 90, in handler\n return self.sign(operation\_name, request)\n File "/usr/local/lib/python2.7/dist-packages/botocore/signers.py", line 154, in sign\n auth.add\_auth(request)\n File "/usr/local/lib/python2.7/dist-packages/botocore/auth.py", line 420, in add\_auth\n super(S3SigV4Auth, self).add\_auth(request)\n File "/usr/local/lib/python2.7/dist-packages/botocore/auth.py", line 352, in add\_auth\n raise NoCredentialsError\nbotocore.exceptions.NoCredentialsError: Unable to locate credentials\n”,  
“module\_stdout”: “”,  
“msg”: “MODULE FAILURE”,  
“rc”: 1  
}

PLAY RECAP \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
[ec2-174-129-95-211.compute-1.amazonaws.com](http://ec2-174-129-95-211.compute-1.amazonaws.com) : ok=1 changed=0 unreachable=0 failed=1  
localhost : ok=2 changed=1 unreachable=0 failed=0

`

here is the version information

`

[jscancella@johns-air chronam-deployment (master)]$ ansible-playbook --version  
ansible-playbook 2.4.2.0  
config file = /Users/jscancella/development/repos/chronam-deployment/ansible.cfg  
configured module search path = [u’/Users/jscancella/.ansible/plugins/modules’, u’/usr/share/ansible/plugins/modules’]  
ansible python module location = /usr/local/Cellar/ansible/2.4.2.0\_1/libexec/lib/python2.7/site-packages/ansible  
executable location = /usr/local/bin/ansible-playbook  
python version = 2.7.14 (default, Sep 25 2017, 09:53:22) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]

`

---

<div class="post-metadata">

**Author:** ![Olivier\_Cervello](https://avatars.discourse-cdn.com/v4/letter/o/c68b51/32.png) [@Olivier\_Cervello](https://forum.ansible.com/u/Olivier_Cervello)\
**Post date:** [December 22, 2017, 2:45am UTC](https://forum.ansible.com/t/s3-unable-to-locate-credentials/26363/2 "2017-12-22T02:45:24Z")

</div>

Try putting the AWS keys in your _~/.aws/credentials_ as described [here](http://docs.aws.amazon.com/cli/latest/userguide/cli-config-files.html)
