Authentication error retrieving ec2 inventory. AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment vars found but may not be correct
<p>We're using Ansible and aws-cli for deployment, configuration management and orchestration of our application.It's a great way to automate those process.<br>
Unfortunately, from time to time (I can't point exactly when, but it happens after few days of working with ansible) I'm getting the following message:</p>

<blockquote>
  <p>Authentication error retrieving ec2 inventory. AWS_ACCESS_KEY_ID and
  AWS_SECRET_ACCESS_KEY environment vars found but may not be correct</p>
</blockquote>

<p>I'm using Ubuntu 14.04 for running ansible, I'm not changing anything related to aws access-key or secret-key. I also tried to work with boto but acts the same.
The only thing that helps is restart my machine.<br>
Any idea, what can cause this problem?</p>

<p>Thanks,
Effi</p>