Made sure to delete ~/.aws/credentials so that Ansible picks up the previous Boto config file
and the most ugly part, monkey-patched the Ansible module I wanted to test (ec2_elb) to redirect Boto logs to a file, since I could never get the console/stdout output to work.
On my system, the module I wanted Boto debug for was located in /Library/Python/2.7/site-packages/ansible/modules/cloud/amazon/ec2_elb.py.
Just after the various import boto, import boto.ec2… lines, I added
strace -o st -s 9999 -e openat,open,readlink,stat,lstat -f python3.7 /home/mdupont/.ansible/tmp/ansible-tmp-1579783694.3938165-128929969192073/AnsiballZ_sqs_queue.py
Shows
7150 openat(AT_FDCWD, “/etc/boto.cfg”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
7150 openat(AT_FDCWD, “/home/mdupont/.boto”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
7150 openat(AT_FDCWD, “/etc/boto.cfg”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
7150 openat(AT_FDCWD, “/home/mdupont/.boto”, O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)