I was setting up AWS CLI on Linux VM to connect with EKS (Kubernetes Server) and followed easy steps mentioned in the link https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html
Though all the steps were executed successfully but on verifying at the end, it throws
Error: syntax error near unexpected token 'newline'
Em,aws-iam-authenticator size should be 17.7M.
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
What I see(you typed the command manually?) is that you are using the wrong url: https://amazon-eks.s3-us-west-2.amazonaws.com/1.16.4/... instead of https://amazon-eks.s3-us-west-2.amazonaws.com/1.14.6/
The output of you aws-iam-authenticator right now is
<?xml version="1.0" encoding="UTF-8"?>
<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>1.16.4/2019-08-22/bin/linux/amd64/aws-iam-authenticator</Key><RequestId>........</RequestId><HostId>..........=</HostId></Error>
Use below:
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