A couple of suggestions that may, or may not help:

  • You may include --verbose to your command to perhaps get better details as to where it fails. Could it be that case that the user you are authenticated as are not able to assume the role specified?

  • In the manual for aws-cli --role-arn is passed as a string, you should try to encapsulate it with double-quotes:

aws eks update-kubeconfig --name eks-cluster --role-arn "arn:aws:iam::999999999999:role/eksServiceRole"

  • Try to manually assume the role through aws-cli.

    1. Verify your current authenticated session: aws sts get-caller-identity

    2. Attempt to assume the role: aws sts assume-role --role-arn "arn:aws:iam::999999999999:role/eksServiceRole" --role-session-name test-eks-role

Answer from William Sandin on serverfault.com
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › learn how access control works in amazon eks › connect kubectl to an eks cluster by creating a kubeconfig file
Connect kubectl to an EKS cluster by creating a kubeconfig file - Amazon EKS
Learn how to create or update a kubeconfig file for authenticating with your Amazon EKS cluster using kubectl. Follow prerequisites for required tools and permissions.
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › learn how access control works in amazon eks › grant iam users and roles access to kubernetes apis › grant iam users access to kubernetes with eks access entries
Grant IAM users access to Kubernetes with EKS access entries - Amazon EKS
This section is designed to show you how to manage IAM principal access to Kubernetes clusters in Amazon Elastic Kubernetes Service (EKS) using access entries and policies. You’ll find details on changing authentication modes, migrating from legacy aws-auth ConfigMap entries, creating, updating, and deleting access entries, associating policies with entries, reviewing predefined policy permissions...
🌐
AWS re:Post
repost.aws › knowledge-center › eks-generate-kubeconfig-file-for-cluster
Generate a kubeconfig file for an EKS cluster | AWS re:Post
January 11, 2024 - On the Permissions tab, choose Add inline policy. Choose the JSON tab. Use a text editor to replace the code with the following IAM policy: { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "eks:DescribeCluster" ], "Resource": "*" } ] } Choose Review policy. For Name, enter a name for the policy. For example: eks_update-kubeconfig.
🌐
Amazon Web Services
docs.aws.amazon.com › cli › latest › reference › eks › update-kubeconfig.html
update-kubeconfig — AWS CLI 2.34.38 Command Reference
aws eks update-kubeconfig \ --name my-eks-cluster \ --role-arn arn:aws:iam::111122223333:role/eksctl-EKS-Linux-Cluster-v1-24-cluster-ServiceRole-j1k7AfTIQtnM \ --alias stage-eks-cluster \ --user-alias john \ --verbose
🌐
Medium
medium.com › @nageshblore › amazon-eks-access-control-for-kubectl-users-of-api-server-165c1071c525
Amazon EKS — Access Control of kubectl users | by Nagesh Subrahmanyam | Medium
November 17, 2020 - To simulate kuser2, run this command with the IAM user who created the cluster. aws --profile kuser2 eks update-kubeconfig --name eks-demo
🌐
GitHub
github.com › aws › aws-cli › issues › 8554
role parameter in eks update-kubeconfig is not being used for aws cli connection · Issue #8554 · aws/aws-cli
February 28, 2024 - Currently, I have to create a new AWS profile and specify the role_arn to ASSUMEDROLE and source as account A profile and run aws eks update-kubeconfig --name clusterB --role arn:aws:iam::ACCOUNTB#:role/ASSUMEDROLE --profile=NEWPROFILE to get the config.
Author   xcompass
Find elsewhere
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › security in amazon eks › identity and access management for amazon eks › amazon eks identity-based policy examples
Amazon EKS identity-based policy examples - Amazon EKS
Want to contribute to this user guide? Scroll to the bottom of this page and select Edit this page on GitHub. Your contributions will help make our user guide better for everyone. By default, IAM users and roles don't have permission to create or modify Amazon EKS resources.
🌐
Kloudle
kloudle.com › academy › allowing-iam-users-to-access-aws-eks-using-kubectl
Allowing IAM users to access AWS EKS using kubectl
Switch to the IAM user that needs access to the cluster and regenerate the kubeconfig using - aws eks update-kubeconfig --name <cluster-name> Running kubectl auth can-i --list should show that you now have ReadAccess to the cluster using the ...
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › learn how access control works in amazon eks › grant iam users and roles access to kubernetes apis
Grant IAM users and roles access to Kubernetes APIs - Amazon EKS
Note that each method stores separate ... is not updated. ... With this authentication mode, you can use the EKS API, AWS Command Line Interface, AWS SDKs, AWS CloudFormation, and AWS Management Console to manage access to the cluster for IAM principals. Each access entry has a type and you can use the combination of an access scope to limit the principal to a specific namespace and an access policy to set preconfigured reusable permissions ...
Top answer
1 of 2
2

From the docs of creating a kubeconfig for Amazon EKS here

Ensure that you have version 1.16.156 or later of the AWS CLI installed.

Clearly this is because of older version(1.15.58) of CLI. Upgrading the CLI should solve this issue.

Also now the CLI has got version 2 which you can install from here

2 of 2
1

Your version of the AWS-CLI needs to be updated. At the very least you need to be running AWS-CLI version 1.16.156 as mentioned in the AWS Docs.

Amazon EKS uses the aws eks get-token command, available in version 1.16.156 or later of the AWS CLI or the AWS IAM Authenticator for Kubernetes with kubectl for cluster authentication.

You'll also need to make sure you have AWS IAM Authenticator installed in order to authenticate using roles.

Download the Amazon EKS-vended aws-iam-authenticator binary from Amazon S3. To download the ARM version, change amd64 to arm64 before running the command. curl -o aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/aws-iam-authenticator

Apply execute permissions to the binary. chmod +x ./aws-iam-authenticator

Copy the binary to a folder in your $PATH. We recommend creating a $HOME/bin/aws-iam-authenticator and ensuring that $HOME/bin comes first in your $PATH. mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$PATH:$HOME/bin

Add $HOME/bin to your PATH environment variable. echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

Test that the aws-iam-authenticator binary works. aws-iam-authenticator help

🌐
ControlPlane
controlplane.com › community-blog › post › kubeconfig-file-for-the-aws-eks-cluster
How to create/update Kubeconfig file for the AWS EKS Cluster — Control Plane
November 2, 2023 - But before you can focus on managing and securing Kubeconfig files for your AWS EKS clusters, you must know how to create and update them properly. An AWS account with the necessary permissions to access your EKS Cluster.
🌐
ComputingForGeeks
computingforgeeks.com › home › grant developers access to eks kubernetes cluster
Grant Developers Access to EKS Kubernetes Cluster
March 22, 2026 - This generates a kubeconfig entry that uses the developer's AWS credentials to authenticate with EKS. If the developer is using an IAM role instead of a user, they need to specify the role ARN: aws eks update-kubeconfig --region us-east-1 --name my-cluster --role-arn arn:aws:iam::ACCOUNT_ID:role/EKSDeveloperRole --alias my-cluster-dev
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › learn how access control works in amazon eks › grant iam users and roles access to kubernetes apis › grant iam users access to kubernetes with a configmap
Grant IAM users access to Kubernetes with a ConfigMap - Amazon EKS
To install or update eksctl, see Installation ... View the current mappings in the ConfigMap. Replace my-cluster with the name of your cluster. Replace region-code with the AWS Region that your cluster is in. eksctl get iamidentitymapping --cluster my-cluster --region=region-code
🌐
Kubedemy
kubedemy.io › home › aws eks – part 18 – kubernetes authentication with iam users
AWS EKS - Part 18 - Kubernetes Authentication with IAM Users | Kubedemy
March 18, 2024 - Attach EKS DescribeCluster permission to the user. Create Access and Secret keys for the user. Add IAM user configuration to the aws-auth configmap. Configure AWS CLI for the new user. Update the Kubeconfig file and access the cluster.
🌐
AWS re:Post
repost.aws › knowledge-center › eks-troubleshoot-iam-issues
Troubleshot IAM role issues in Amazon EKS | AWS re:Post
July 10, 2025 - To check your credentials, run ... file configurations. If the configurations aren't correct, then use the update-kubeconfig command to update the file:...
🌐
Open Source at AWS
aws.github.io › aws-eks-best-practices › security › docs › iam
Identity and Access Management - EKS Best Practices Guides
The aws-iam-authenticator project includes a CLI for updating the ConfigMap. Download a release on GitHub. ... $ ./aws-iam-authenticator add role --rolearn arn:aws:iam::185309785115:role/lil-dev-role-cluster --username lil-dev-user --groups system:masters --kubeconfig ~/.kube/config ... While IAM is the preferred way to authenticate users who need access to an EKS cluster, it is possible to use an OIDC identity provider such as GitHub using an authentication proxy and Kubernetes impersonation.
🌐
AWS
docs.aws.amazon.com › amazon eks › user guide › get started with amazon eks › get started with amazon eks – aws management console and aws cli
Get started with Amazon EKS – AWS Management Console and AWS CLI - Amazon EKS
Note that AWS CLI v2 is required to use the update-kubeconfig option shown in this page. kubectl – A command line tool for working with Kubernetes clusters. For more information, see Set up kubectl and eksctl. Required IAM permissions – The IAM security principal that you’re using must have permissions to work with Amazon EKS IAM roles, service linked roles, AWS CloudFormation, a VPC, and related resources.
🌐
EKS Workshop
eksworkshop.com › cluster access management api › associating access policies
Associating access policies | EKS Workshop
~$aws eks update-kubeconfig --name $EKS_CLUSTER_NAME \ --role-arn $READ_ONLY_IAM_ROLE --alias readonly --user-alias readonly