<p>I was setting up AWS CLI on <strong>Linux</strong> VM to connect with EKS (Kubernetes Server) and followed easy steps mentioned in the link <a href="https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html</a></p>

<p>Though all the steps were executed successfully but on verifying at the end, it throws </p>

<blockquote>
  <p>Error: syntax error near unexpected token 'newline'</p>
</blockquote>

<p><a href="https://i.stack.imgur.com/VYYky.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VYYky.jpg" alt="enter image description here"></a></p>

fortanu82
<p>Em,aws-iam-authenticator size should be 17.7M.</p>

<pre><code>curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/linux/amd64/aws-iam-authenticator
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 17.7M  100 17.7M    0     0  6789k      0  0:00:02  0:00:02 --:--:-- 6788k
</code></pre>

<p>What I see(you typed the command manually?) is that you are using the wrong url: 
<a href="https://amazon-eks.s3-us-west-2.amazonaws.com/1.16.4/" rel="nofollow noreferrer">https://amazon-eks.s3-us-west-2.amazonaws.com/1.16.4/</a>... instead of <a href="https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/" rel="nofollow noreferrer">https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/</a></p>

<p>The output of you aws-iam-authenticator right now is</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;Error&gt;&lt;Code&gt;NoSuchKey&lt;/Code&gt;&lt;Message&gt;The specified key does not exist.&lt;/Message&gt;&lt;Key&gt;1.16.4/2019-08-22/bin/linux/amd64/aws-iam-authenticator&lt;/Key&gt;&lt;RequestId&gt;........&lt;/RequestId&gt;&lt;HostId&gt;..........=&lt;/HostId&gt;&lt;/Error&gt;
</code></pre>

<p>Use below:</p>

<pre><code>curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/2019-08-22/bin/linux/amd64/aws-iam-authenticator
</code></pre>
