IAM Agent and Workload Identity on AWS: EKS Setup With SPIFFE (Preview)
IAM agent and workload identity, in preview since December 1, 2026, gives every AI agent and workload on AWS its own name tag, so your policies and logs can tell apart two agents that share the same IAM role.
Here’s what changes: until now, every pod using the same IAM role looked identical to AWS. Now each workload carries its own verified name into that role session, so a bucket can let the checkout service in and keep the reports service out, even though both use the same role. And you don’t touch the role’s trust policy at all.
Jake’s shop now runs two little AI agents on Kubernetes: one answers order questions, one writes the weekly sales report. Both use the same IAM role, because that’s how Ethan set it up.
Jake: "So the report agent could read the customer addresses too?"
Ethan: "Today, yes. With workload identity, the bucket can tell the two apart and only let the order agent in."
New to this? The plain-English version
- Workload: any program that calls AWS on its own: an app, a script, an AI agent.
- IAM role: a set of permissions a workload borrows. Many workloads can borrow the same role, which is the problem this solves.
- Identity: a verified name for one specific workload, separate from the permissions it uses.
- SPIFFE: an open naming standard for workloads. Names look like web addresses starting with
spiffe://. - Provider and template: the provider owns your naming space; a template is the rule that builds each workload’s name from verified facts, such as cluster, namespace and service account.
- EKS Pod Identity: how pods on Amazon EKS get AWS credentials. If that’s new, our Pod Identity troubleshooting guide covers the basics.
Jake: "So the role is the key, and the identity is the name on the key?"
Ethan: "Exactly. Two people can share a key, but now the door knows who’s holding it."
Can you use it today? Three quick questions
- Do your agents or apps run on Amazon EKS with Pod Identity, or on Bedrock AgentCore? Those are supported now.
- Is your EKS Pod Identity Agent add-on at v1.5.0-eksbuild.3 or later? The console offers an update if not.
- Is this for testing first? It’s a preview, so try it on a test cluster and a test bucket.
How it works on Amazon EKS
- A pod asks the EKS Pod Identity Agent for credentials, as it always has.
- EKS reports the pod’s cluster, namespace and service account, facts the pod can’t fake.
- AWS STS checks the template’s attestation policy and builds the identifier, for example
spiffe://111122223333.aws.internal/us-east-1/eks/prod-cluster-1/ns/payments/sa/checkout-sa. - The pod gets its normal role session, now carrying that identity. Your application doesn’t change.
- If it needs to talk to something outside AWS, the pod can also ask for a short-lived JWT or X.509 certificate through a local SPIFFE-compatible socket.
By default, all pods under one service account share an identity. To give every pod its own, use a template whose path ends with the pod UID or pod name.
Step 1 and 2: Create a provider and template, then turn it on
In IAM (about 10 minutes):
- Open the IAM console and choose Agent and workload identity in the navigation pane.
- Choose Create a provider (in a management account: Create a provider for your organization). Name it, for example
payments-prod, and keep the default scheme and trust domain, such as111122223333.aws.internal. - Under Templates, choose Customize templates, add the Amazon EKS template and name it, for example
eks-prod-1. - Choose Create provider and templates. IAM creates two JWT signing keys for the provider.
In EKS: open your cluster’s Access tab, edit the workload’s Pod Identity association, turn on Enable IAM for agents and workloads, pick the provider and template, save, and restart the pods. The same thing with the AWS CLI (both ARNs are required):
aws eks update-pod-identity-association \
--cluster-name prod-cluster-1 \
--association-id <association-id> \
--workload-identity-config '{
"enabled": true,
"templateArn": "arn:aws:iam::111122223333:workload-identity-template/eks-prod-1",
"providerArn": "arn:aws:iam::111122223333:workload-identity-provider/payments-prod"
}'
Leave the role’s trust policy alone. It still needs the statement that lets pods.eks.amazonaws.com call sts:AssumeRole and sts:TagSession; remove it and the pods stop getting credentials.
Step 3: Let only one workload read a bucket
Name the workload, not the role, in the resource policy. This S3 bucket policy allows only the checkout workload (use a test bucket: the Deny statements block everyone else, including administrators):
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowCheckoutWorkload",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*",
"Condition": {
"StringEquals": {
"aws:PrincipalAccount": "111122223333",
"aws:OriginIdentity/Subject": "spiffe://111122223333.aws.internal/us-east-1/eks/prod-cluster-1/ns/payments/sa/checkout-sa",
"aws:OriginIdentity/Issuer": "arn:aws:iam::111122223333:workload-identity-provider/payments-prod"
}
}
},
{
"Sid": "DenyOtherWorkloads",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*",
"Condition": {
"StringNotEquals": {
"aws:OriginIdentity/Subject": "spiffe://111122223333.aws.internal/us-east-1/eks/prod-cluster-1/ns/payments/sa/checkout-sa"
}
}
},
{
"Sid": "DenyOtherProviders",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::amzn-s3-demo-bucket/*",
"Condition": {
"StringNotEquals": {
"aws:OriginIdentity/Issuer": "arn:aws:iam::111122223333:workload-identity-provider/payments-prod"
}
}
}
]
}
aws:OriginIdentity/Subjectmust match the workload’s identifier, andaws:OriginIdentity/Issueryour provider. Always check both: an identifier is unique only within its provider.aws:PrincipalAccountkeeps S3 Block Public Access from rejecting a"Principal": "*"policy.- Test it: from the checkout pod,
aws s3 cp s3://amzn-s3-demo-bucket/orders/hello.txt -works. From another pod using the same role but a different service account, it fails with AccessDenied.
Jake: "Same key, different answer at the door?"
Ethan: "Right. The role didn’t change; the bucket now checks the name."
Using the identity outside AWS
- JWT-SVIDs: short-lived JSON Web Tokens whose subject is the workload’s identifier. You choose the audience, and the outside service checks the token with your provider’s public keys. No stored API secret needed.
- X.509-SVIDs: certificates for mutual TLS between services, signed by your own AWS Private CA (which costs extra, and a newly attached CA starts signing about an hour later).
- Bedrock AgentCore: create a provider and template, then turn on agent and workload identity when you create a Runtime or Gateway. Managed agent platforms such as Claude Managed Agents on Bedrock run on AgentCore.
- Audit: AWS CloudTrail records the identity, so you can see which agent did what.
Naming rules and limits worth knowing
| Rule | Detail |
|---|---|
| Characters | Letters, digits, periods, hyphens and underscores in each path segment |
| Path prefix | Up to 64 characters |
| Full identifier | Up to 256 characters; longer fails with InvalidWorkloadIdentityConfiguration |
| Case | Case-sensitive everywhere: Prod and prod are different workloads |
| Reuse | Not reserved: the same facts produce the same identifier and access after deletion |
| No attestation policy | A template without one issues nothing |
| EKS Regions | All commercial Regions except Middle East (Bahrain) and Middle East (UAE) |
Common mistakes
| Mistake | What happens | Fix |
|---|---|---|
| Editing the role’s trust policy “for the new feature” | Pods stop getting credentials | Leave the pods.eks.amazonaws.com trust statement as it is |
| Old Pod Identity Agent add-on | Identity isn’t delivered | Update to v1.5.0-eksbuild.3 or later |
| Not restarting pods | Pods keep their old credentials | Restart after saving the association |
| Checking Subject only | Another provider could issue the same name | Match Subject and Issuer |
| Deny statements on a real bucket | Admins lose read access too | Test on a test bucket first |
| Expecting one identity per pod by default | Pods under one service account share it | Use a template ending with pod UID or name |
How Ethan separated Jake’s two agents
- He updated the EKS Pod Identity Agent add-on, then created a provider and the default EKS template in IAM.
- He moved the report agent to its own service account,
reports-sa, so the two agents got different identities. - He turned on identity for both Pod Identity associations and restarted the pods.
- He added a bucket policy that allows only the order agent’s identity to read customer addresses.
- In CloudTrail he could finally see which agent made each call.
Jake: "And the report agent?"
For readers preparing for an AWS certification
We have been covering AWS certifications alongside our fixes, so here is a short extra for readers studying for one. If you only came for the fix, you already have it; feel free to skip this part.
Exams that test this topic: Security – Specialty (SCS-C03) • Solutions Architect – Associate (SAA-C03) • Developer – Associate (DVA-C03 from December 1, 2026).
Here are the exam-style questions this topic tends to raise, with the reasoning you need to answer them:
1. Two EKS workloads share one IAM role through EKS Pod Identity, but only one should read an S3 bucket. How can the bucket policy tell them apart without separate roles?
Turn on IAM agent and workload identity (preview) for the Pod Identity associations, then condition the bucket policy on aws:OriginIdentity/Subject (the workload identifier) and aws:OriginIdentity/Issuer (the provider ARN).
2. After enabling agent and workload identity, must the IAM role trust policy for EKS Pod Identity be changed?
No. AWS STS adds the identity to the existing role session; the trust statement for pods.eks.amazonaws.com with sts:AssumeRole and sts:TagSession must stay.
3. Which open standard do IAM agent and workload identities follow, and which credentials can workloads obtain?
SPIFFE: identifiers like spiffe://domain/path, with short-lived JWT-SVIDs and X.509-SVIDs that renew automatically for authentication to AWS, your APIs and third-party services.
4. Why should a policy match both aws:OriginIdentity/Subject and aws:OriginIdentity/Issuer?
An identifier is unique only within its provider, so matching the issuer prevents a workload named the same under a different provider from gaining access.
5. A security team must know which AI agent made each AWS API call, even when agents share a role. What provides this?
IAM agent and workload identity: each request carries the agent or workload identity, which is recorded in AWS CloudTrail and can be referenced in IAM and resource policies.
Exam codes and dates change often. Our AWS certification changes page keeps track of what is current.
Ethan: "Still has its role and its sales data. It just can’t open the customer file any more."
IAM agent and workload identity documentation and official references
- AWS What’s New: IAM agent and workload identity (preview): what it is and where it works.
- AWS What’s New: Amazon EKS support: Pod Identity integration and Regions.
- IAM User Guide: IAM for agents: identities, Credential Broker and enterprise authorization.
- Getting started with agent and workload identity: the full EKS walkthrough.
- Amazon EKS User Guide: workload identity: Pod Identity settings.
Frequently asked questions
What is IAM agent and workload identity?
A preview feature, announced December 1, 2026, that gives each AI agent or workload on AWS its own verifiable identity on top of its IAM role. The role still decides what it can do; the identity shows exactly which agent made each request.
Is IAM agent and workload identity free?
Yes during the preview: identities for agents and workloads have no additional charge, and the Amazon EKS integration is free. If you issue X.509 certificates, AWS Private CA charges for the certificate authority and certificates.
What is SPIFFE?
The Secure Production Identity Framework for Everyone, an open standard for naming workloads. IAM identities look like spiffe://<domain>/<path>, and workloads can get JWT-SVID and X.509-SVID documents that other SPIFFE-aware systems understand.
How does EKS Pod Identity work with workload identity?
Turn it on for a Pod Identity association with a provider and template. The usual Pod Identity credentials then carry the pod’s identity, so your application needs no change, and the Pod Identity Agent can also hand out JWTs and X.509 certificates.
Do I need to change my IAM role’s trust policy?
No. AWS STS adds the identity to the session of the role that EKS Pod Identity already assumes. Keep the existing trust statement for pods.eks.amazonaws.com with sts:AssumeRole and sts:TagSession.
Can two pods with the same IAM role get different access?
Yes, that’s the main point. A resource policy can check aws:OriginIdentity/Subject, so a pod running as one service account can read a bucket while another pod using the same role gets AccessDenied.
What condition keys does workload identity add?
aws:OriginIdentity/Subject (the workload’s identifier) and aws:OriginIdentity/Issuer (the provider’s ARN). Always check both, because an identifier is only unique within its provider.
Which EKS Pod Identity Agent version is required?
Version v1.5.0-eksbuild.3 or later. EKS Auto Mode includes the agent, but its nodes need an Auto Mode AMI released on or after November 18, 2026.
Does every pod get its own identity?
Not by default. The default template builds the identity from Region, cluster, namespace and service account, so pods under one service account share it. A template whose path ends with the pod UID or name gives each pod its own.
Which Regions support agent and workload identity?
All commercial AWS Regions for IAM. The Amazon EKS integration is in all commercial Regions except Middle East (Bahrain) and Middle East (UAE).
Does it work with Amazon Bedrock AgentCore?
Yes. Create a provider and template, then turn on agent and workload identity when you create an AgentCore Runtime or AgentCore Gateway.
Can an agent use its identity outside AWS?
Yes. It can request a short-lived JWT-SVID with an audience you choose, and the outside service verifies it with your provider’s public keys. X.509 certificates support mutual TLS between services.
Are workload identifiers case-sensitive?
Yes, everywhere, including policies and CloudTrail: Prod and prod are different workloads. Condition key names themselves are case-insensitive like all IAM condition keys.
What happens if I delete a template and recreate it?
Identifiers aren’t reserved. A workload that presents the same attested facts gets the same identifier, and therefore the same access, so clean up policies that name retired workloads.
What is the AWS IAM Credential Broker?
Another preview in the IAM for agents family, which gets agents credentials for external services. It is separate from agent and workload identity.
How do I see which agent made a request?
In AWS CloudTrail. Requests from a workload with identity turned on record its identifier, so you can tell agents apart even when they share an IAM role.
Revision note. Written December 2, 2026, the day after the preview opened. Preview features, names and Regions can change, so check the live getting started guide before you change production policies. “Trust, but verify”: give every agent a name before you give it a key.