aws / aws/aws-sdk-java-v2

Equivalent to `aws eks get-token`

Open
#6,440 1 comment 1 reaction 0 assignees View on GitHub
feature-request service-api service:eks
Dominant language
Java
Stars
2.6k
Forks
1k
Avg merge
2d 9h
Merged PRs (30d)
51

Description

### Describe the feature

It would be nice if there was a AWS Java SDK equivalent of AWS CLI's `aws eks get-token`, which I could call to generate a (time-limited) Kubernetes API token for my Java process' current AWS identity similar to:
```json
{
"kind": "ExecCredential",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"spec": {},
"status": {
"expirationTimestamp": "1970-01-01T00:00:00Z",
"token": "k8s-aws-v1.[REDACTED]"
}
}
```

### Use Case

Authenticate to an AWS EKS cluster via its regular Kubernetes HTTP API, without having to create a permanent Kubernetes API token and pass it to the Java process that's already authenticated to AWS.

### Proposed Solution

An officially sanctioned version of e.g. https://github.com/MrBergin/EksX or https://stackoverflow.com/questions/59853623/get-authentication-token-from-aws-eks-using-the-aws-java-sdk-v2.

### Other Information

References: https://github.com/aws/aws-sdk-java/discussions/2737
References: https://github.com/aws/aws-sdk-java/issues/1795
References: https://stackoverflow.com/questions/59853623/get-authentication-token-from-aws-eks-using-the-aws-java-sdk-v2
References: https://github.com/MrBergin/EksX

### Acknowledgements

- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS Java SDK version used

2.33.2

### JDK version used

docker.io/library/eclipse-temurin:17.0.16_8-jre

### Operating System and version

Linux 6.16

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.