Skip to content

EKS authentication slower with aws-cli than aws-iam-authenticator #5570

@emaincourt

Description

@emaincourt

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
When using the aws-cli, it takes around 5 seconds to get a proper token to communicate with our EKS clusters. Performing the same action with aws-iam-authenticator takes less than a second.

SDK version number
aws-cli/2.0.50
aws-iam-authenticator/0.5.1

Platform/OS/Hardware/Device
Both MacOS and Ubuntu

To Reproduce (observed behavior)

time aws-iam-authenticator token -i eks-staging                                                                                                                                                                                         (arn:aws:eks:eu-west-3:<REDACTED>:cluster/eks-staging/default)
{"kind":"ExecCredential","apiVersion":"client.authentication.k8s.io/v1alpha1","spec":{},"status":{"expirationTimestamp":"2020-09-24T13:53:42Z","token":"<REDACTED>"}}
aws-iam-authenticator token -i eks-staging  0.09s user 0.05s system 14% cpu 0.966 total

time aws eks get-token --cluster-name eks-staging                                                                                                                                                                                       (arn:aws:eks:eu-west-3:<REDACTED>:cluster/eks-staging/default)
{"kind": "ExecCredential", "apiVersion": "client.authentication.k8s.io/v1alpha1", "spec": {}, "status": {"expirationTimestamp": "2020-09-24T14:03:47Z", "token": "<REDACTED>"}}
aws eks get-token --cluster-name eks-staging  0.71s user 0.23s system 21% cpu 4.347 total

Expected behavior
Both should respond in the same time.

Logs/output

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    customizationIssues related to CLI customizations (located in /awscli/customizations)eks-kubeconfigenhancementfeature-requestA feature should be added or improved.needs-reviewThis issue or pull request needs review from a core team member.p3This is a minor priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions