<p>I'm getting the following warning when trying to run the <code>aws</code> client with the <code>aws-iam-authenticator</code> for kubernetes:</p>

<pre><code>Warning: aws-iam-authenticator is not installed properly or is not in your path.
</code></pre>

<p>However, the <code>aws-iam-authenticator</code> is clearly in my path, since I can call <code>aws-iam-authenticator help</code> and it returns results:</p>

<pre><code>$ aws-iam-authenticator help
A tool to authenticate to Kubernetes using AWS IAM credentials

Usage:
  heptio-authenticator-aws [command]
...
</code></pre>

<p>Oddly enough though, <code>which aws-iam-authenticator</code> does not return successfully. So something is odd with my <code>PATH</code>.</p>

<p>Here is a subset of my path:</p>

<pre><code>echo $PATH
/usr/local/sbin:~/work/helpers/bin:~/.rbenv/shims:...:/usr/bin:/bin:/usr/sbin:/sbin
</code></pre>

<p>The <code>aws-iam-authenticator</code> is located in <code>~/work/helpers/bin</code></p>

Gavin Miller
<p>Turns out the issue is because I used the <code>~</code> in my <code>PATH</code>. I found <a href="https://github.com/kubernetes-sigs/aws-iam-authenticator/issues/136#issuecomment-417417212" rel="nofollow noreferrer">this issue and comment</a> that pointed me in the correct direction. Updating my <code>PATH</code> to below solved my issue:</p>

<pre><code>echo $PATH
/usr/local/sbin:/$HOME/work/helpers/bin:/$HOME/.rbenv/shims:...:/usr/bin:/bin:/usr/sbin:/sbin
# Where $HOME is expanded properly
</code></pre>

<p>I think it may be best practice to prefer <code>$HOME</code> vs <code>~</code> in <code>PATH</code> exports, but I can't find anything on SO / internet to confirm or deny.</p>
