eks-token
EKS Token package, an alternate to "aws eks get-token ..." CLI
What it is and what it does
eks-token is a Python library that generates Kubernetes authentication tokens for AWS EKS clusters without invoking the AWS CLI. It wraps the token generation logic that `aws eks get-token` provides, making it suitable for programmatic use in Python applications that need to authenticate to EKS. The package returns tokens in the Kubernetes ExecCredential format, which can be used directly by kubectl or other Kubernetes clients.
The library depends on awscli and supports Python 3.6 and later. It allows you to specify a cluster name, optionally an IAM role ARN to assume, and a custom AWS region. The token is returned as part of a structured response containing metadata and expiration information, which you can extract and use for cluster authentication.
Use it for:
- Automate EKS cluster authentication in CI/CD pipelines without shelling out to the AWS CLI.
- Generate tokens for specific IAM roles when your application needs cross-role or cross-account EKS access.
- Embed EKS authentication directly in Python deployment or management tools that orchestrate Kubernetes workloads on AWS.
- Programmatically obtain tokens with custom region configuration for multi-region EKS deployments.
- Integrate EKS authentication into custom credential providers or Kubernetes client libraries written in Python.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates Kubernetes authentication tokens for AWS EKS clusters programmatically, replacing the need to call the AWS CLI's `aws eks get-token` command.
Yes, if you need programmatic EKS token generation in Python and want to avoid subprocess calls to the AWS CLI. The package is actively maintained, has low install friction, and carries no known vulnerabilities. The main caveat is that the license is unclear—verify it directly in the repository before use in proprietary projects. It is suitable for production use in CI/CD, deployment automation, and Kubernetes client integrations.
Install
eks-token on PyPI
pip
pip install eks-tokenuv
uv add eks-tokenpoetry
poetry add eks-tokenInstalling eks-token
Before you install
Low install friction with a pure Python wheel. The package is actively maintained with a recent commit on 2026-08-12 and has been in active development since its first release on 2020-10-01. It depends only on awscli, which is a common AWS tooling dependency.
License in practice
License status is unclear—no SPDX identifier or raw license text is available in the package metadata. Before using in a commercial or proprietary project, verify the actual license by checking the repository directly.
Quickstart
pip install eks-token
from eks_token import get_token
token = get_token(cluster_name='my-cluster')['status']['token']
print(token)
Requires AWS credentials to be configured in the environment (via awscli or AWS SDK configuration) to authenticate against EKS.
Verify before relying
- Whether the package supports IAM role assumption for cross-account EKS access beyond the role_arn parameter shown in examples.
- Token expiration handling and refresh behavior when tokens expire during long-running operations.
- Performance characteristics when generating tokens for multiple clusters or roles in sequence.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — awscli |
| Maintenance | actively maintained — 588 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 275,308/month — #8,180 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: eks_token-0.3.0-py3-none-any.whl
Keywords: eks, k8s, boto3, awscli, python, aws
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
awslabs.eks-mcp-serverConnects AI code assistants to Amazon EKS…
permissive · top 15,000 on PyPI
pulumi-eksPulumi component for provisioning and managing…
permissive · top 15,000 on PyPI
aws-requests-authAdds AWS Signature Version 4 authentication to…
permissive · top 1,000 on PyPI
kubernetes-asyncioAsynchronous Python client for the Kubernetes…
permissive · top 5,000 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI
aws-assume-role-libSimplifies AWS role assumption in boto3 by…
permissive · top 15,000 on PyPI
aws-msk-iam-sasl-signer-pythonGenerates IAM-signed SASL/OAUTHBEARER…
permissive · top 5,000 on PyPI
requests-aws-signAdds AWS V4 request signing to the requests…
permissive · top 5,000 on PyPI
pulumi-kubernetesPulumi Kubernetes Resource Provider lets you…
permissive · top 5,000 on PyPI
kappaKappa is a command-line tool that automates the…
permissive · top 15,000 on PyPI