skillfed

eks-token

EKS Token package, an alternate to "aws eks get-token ..." CLI

eks-token v0.3.0 275.3K downloads/30d#8,180 on PyPI28
License unclear Active released

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-token

uv

uv add eks-token

poetry

poetry add eks-token

Installing 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

Operating System :: OS IndependentProgramming Language :: Python :: 3

Tags

eks kubernetes authentication tokenaws eks token generationk8s aws credential providereks cluster access tokenaws iam role token signingkubernetes eks autheks token alternative to cli
aws-ekskubernetes-authiam-integration

More Networking packages