aws-iam-authenticator: letting IAM roles be Kubernetes users
A tool to use AWS IAM credentials to authenticate to a Kubernetes cluster
At a glance
- What is it?
- A Go server that runs as a daemonset on control plane nodes, validates AWS STS tokens for the API server, and maps roles to Kubernetes groups with RBAC.
- Who is it for?
- The appeal of aws-iam-authenticator is that it removes a credential store most clusters would otherwise have to maintain, replacing it with the identity system the cloud provider already runs and audits. The cost is a component in the API server's authentication path, which means the setup order in the README matters and a mistake there affects cluster access.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 2 days ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 7, 2026, and from our analysis. They are not legal advice.
Editorial analysis
The problem it solves is having two credential systems
The README frames this as an efficiency question rather than a technical one. If you run a Kubernetes cluster on AWS, you already manage AWS IAM credentials to provision and update the cluster, so by adding this tool you avoid having to manage a separate credential for Kubernetes access.
The properties the README names in support of that are worth reading twice: an out of band audit trail via CloudTrail, and 2FA and MFA enforcement. Both come free with IAM and neither is easy to add to a self-managed credential store, which is the real argument. A Kubernetes service account token has no equivalent of an audit trail in your identity provider and no way to require a second factor at login.
The second use case is more specific and arguably more valuable. If you are building a Kubernetes installer on AWS, the tool lets you skip smuggling an initial admin credential out of a newly installed cluster. Instead you create a dedicated `KubernetesAdmin` role at provisioning time and configure the Authenticator to allow cluster administrator logins against it.
That solves a genuinely awkward bootstrap problem. Without it, a fresh cluster has an admin credential that has to be transported somewhere, and that is a problem with no good answer.
Four steps, and the order is the hard part
The README gives the setup as four numbered steps: create an IAM role to identify users, run the Authenticator server as a DaemonSet, configure the API server to talk to it, and set up kubectl to use Authenticator tokens.
Step one can be done in the AWS console by choosing the cross-account access role option, or in one command sequence with the CLI. The console route needs no policies attached to the role at all, since it is used only for identity, and the ARN of the role is the value you need for the next step. The CLI route builds a trust policy and creates the role in one pass.
Step two runs the server on each master node as a DaemonSet with host networking so it can expose a localhost port. The sample configuration lives in `deploy/example.yaml`, and the README tells you to replace the placeholder ARNs, set `clusterID`, and verify the scheduling rules match your control plane node labels and taints before applying.
Step three is the one that catches people out, because the API server needs a flag added:
--authentication-token-webhook-config-file=/etc/kubernetes/aws-iam-authenticator/kubeconfig.yamlOn a static pod cluster that means editing the manifest, mounting the host directory into the API server pod, and restarting kubelet to pick up the changed static pod definition.
Three mapping backends, and the one that changes the workflow
The fourth step is where the identity mapping lives, and the README is specific about the default. By default the server sources mappings exclusively from the `mapUsers` and `mapRoles` fields of its configuration file, which is the file mounted by the server pod and corresponds to `--backend-mode=MountedFile`.
Two additional backends are available through the `--backend-mode` flag. `EKSConfigMap` reads an EKS-style ConfigMap, and `CRD` reads `IAMIdentityMapping` custom resources.
That third option is the one that changes how you operate the cluster. With `mapRoles` in a file, adding a role means editing a file and restarting or reloading the server. With `IAMIdentityMapping` custom resources, adding a role means creating an object in the cluster, which fits the same RBAC and audit model as everything else. Anyone who would reach for `kubectl edit configmap` on the EKS backend has effectively chosen one of the three.
The mapping itself is what turns an AWS principal into a Kubernetes identity. `mapRoles` handles EC2 instances and federated roles, `mapUsers` handles IAM users, and the README points to the full configuration format section for the details of how a principal becomes a username and a set of groups. The groups are the part that matters, because they are what Kubernetes RBAC policies bind to.
Certificates generated either way, but one path needs an API server restart
When `aws-iam-authenticator server` runs on a control plane node it creates the webhook kubeconfig on the host at `/etc/kubernetes/aws-iam-authenticator/kubeconfig.yaml`, or at the path set with `--generate-kubeconfig`. That file is what the API server flag from the previous section points at.
For an automated installer there is a second path. The `aws-iam-authenticator init` command generates the certificate, key and webhook kubeconfig files in advance and places them in the configured output directories, which means they can be generated before the master nodes exist and baked into the host paths.
The tradeoff the README describes is precise. If you do not pre-generate the files, the server generates them on demand, and that works, but it requires restarting the Kubernetes API server after installation. Pre-generating avoids the restart, at the cost of having to distribute the files yourself.
For a cluster created by a configuration management tool, pre-generating is clearly right. For a single hand-built cluster, generating on demand and taking one restart is simpler. Either way the certificate and key are the sensitive part, since a leaked webhook kubeconfig is a credential for the API server's authentication path.
A mature repository with a compliance release history
The repository metadata reads as settled rather than busy: 2,336 stars, 455 forks, 21 open issues, Apache-2.0, not archived, last push on 2026-09-28, default branch `master`. The version line is v0.7.x, which tells you the project is still pre-1.0 in its own numbering after several years.
The release notes are unusually worth reading, because two of the three most recent releases are about compliance rather than features. v0.7.18 was created explicitly for CVE mitigation, bumping `x/net` and `x/sys`. v0.7.19 bumped `golang.org/x/text` to remediate GO-2026-5970 and moved the Dockerfile to Go 1.26.5 for CVEs, plus a cleanup of `k8s.io` prerelease dependencies and a replace directive for integration tests.
v0.7.20, published 2026-08-26, added EC2 metrics instead: `ec2_responses_total` and `ec2_connection_failures_total`, with unit tests for the connection metrics and a fix removing a hardcoded response code for the `ec2_total_responses` metric.
Those metrics are the interesting feature. They measure whether the authenticator's calls to the EC2 credential endpoint are succeeding, which is the failure mode that would otherwise show up as mysterious login failures.
The tree also carries `SECURITY_CONTACTS`, `OWNERS`, `OWNERS_ALIASES`, a `.goreleaser.yaml`, `cloudbuild.yaml` and a `go.work` file, which is the standard apparatus for a project taking security reports seriously.
Editorial conclusion
The appeal of aws-iam-authenticator is that it removes a credential store most clusters would otherwise have to maintain, replacing it with the identity system the cloud provider already runs and audits. The cost is a component in the API server's authentication path, which means the setup order in the README matters and a mistake there affects cluster access. Version 0.7.20 shipped on 2026-08-26 with EC2 connection metrics, and version 0.7.18 was explicitly a release for CVE mitigation. Start with the role and mapping configuration, since everything else depends on it.
Frequently asked questions
What is the benefit of using AWS IAM credentials to authenticate to Kubernetes?
You avoid managing a separate credential store for Kubernetes access, since you already manage IAM credentials to provision the cluster. The README names two specific properties that come with IAM: an out of band audit trail through CloudTrail, and 2FA and MFA enforcement at login, neither of which is easy to add to a self-managed token store.
How do I add AWS IAM Authenticator to an existing cluster?
The README gives four steps in order: create an IAM role to identify users, run the Authenticator server as a DaemonSet with host networking on master nodes, add the token webhook config file flag to the API server, and configure kubectl to use Authenticator tokens. Sample DaemonSet and ConfigMap configuration is in `deploy/example.yaml`, with placeholder ARNs to replace.
What is the difference between the MountedFile, EKSConfigMap and CRD backends?
All three are mapping backends selected with the `--backend-mode` flag, and each determines where the server reads its IAM identity mappings from. MountedFile is the default and reads `mapUsers` and `mapRoles` from the mounted configuration file. EKSConfigMap reads an EKS-style ConfigMap, and CRD reads `IAMIdentityMapping` custom resources, which is the backend that lets you manage role mappings with cluster objects rather than file edits.
Do I have to restart the API server when installing aws-iam-authenticator?
If you let the server generate the certificate, key and webhook kubeconfig on demand, then yes. The README states that this works but requires restarting the Kubernetes API server after installation. Running `aws-iam-authenticator init` ahead of time to pre-generate those files avoids the restart, which is what the README suggests for automated installers.
What changed in the recent aws-iam-authenticator releases?
Version 0.7.20 added EC2 connection metrics, specifically `ec2_responses_total` and `ec2_connection_failures_total`, with unit tests. Version 0.7.19 was dependency work for CVE remediation, bumping `golang.org/x/text` and moving the Dockerfile to Go 1.26.5, and version 0.7.18 was created specifically to mitigate CVEs in `x/net` and `x/sys`.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/kubernetes-sigs-aws-iam-authenticator)