Published
- 6 min read
By Allan D - Editor, AI Security Wire
AWS IAM Agent Identity Preview: Start Replacing Agent Secrets With Identity
AWS announced IAM agent and workload identity this week, and the pitch is aimed squarely at what we see as the weakest habit in agent deployments: handing an agent a long-lived secret and hoping it stays put. The feature gives each workload, including each AI agent, a unique identity in IAM, and AWS STS checks facts about the workload before it issues short-lived credentials. It is a preview, so treat everything here as subject to change. The details below come from the AWS Security Blog post, which we read in full. We have not tested the feature.
What AWS says it does
Per the post, you manage the identities centrally across your organization. For AWS services, IAM adds the identity to the workload’s IAM role session. For non-AWS services, the workload presents short-lived credentials as a JSON Web Token (JWT) or an X.509 certificate. The preview covers workloads and agents on Amazon EKS, Amazon Bedrock AgentCore Runtime and Amazon Bedrock AgentCore Gateway, at no additional charge in AWS commercial Regions.
The design has three parts: a provider that acts as the root of trust, templates that define how each identifier is built and which workloads qualify, and the credentials each workload receives. The preview supports SPIFFE, so identifiers look like spiffe://corp.example.com/... and credentials are SPIFFE Verifiable Identity Documents (SVIDs). The post’s example gives a payments agent on EKS an identifier built from account, Region, cluster, namespace and service account.
Attestation is the part to scrutinize
Before issuing an identity, AWS checks what the workload is. You attach an attestation policy to each template. On EKS, the service supplies facts the pod cannot change, and STS evaluates them against the policy. If the facts do not match, the pod gets no identity. AgentCore Runtime and Gateway supply their facts from their own control plane.
You do not have to write a policy to start, because IAM applies a default attestation policy per service. The post says you can write your own when the definition admits more workloads than you intend, for example to limit identities to one cluster, to production namespaces or to one AgentCore Runtime. The post does not say what the default admits, so we could not verify its scope. We would check it first: a policy broad enough to admit every pod in a cluster would hand an identity to every pod, including an agent someone deployed to test a prompt.
Scoping access by identity
The post shows a bucket policy that allows s3:GetObject only when the request’s aws:OriginIdentity/Subject matches the agent’s identifier. It also requires aws:OriginIdentity/Issuer to match the provider, and explains why: an identifier is unique only within its provider, and Amazon S3 Block Public Access treats a policy that uses the subject alone as public. Match both keys together.
The post also says resource-based policies, resource control policies (RCPs) and other IAM policy types can restrict access by workload identifier. Organization-level resources grant no new permissions: the principal’s identity policies, service control policies and RCPs still apply.
Replacing the stored secret
Two of the post’s three examples remove a secret outright. In the SaaS example, the agent requests a JWT-SVID from STS with the SaaS provider as the audience and sends it to the provider’s token endpoint in place of a client secret. The provider checks the iss, aud and sub claims against its federation policy and returns a short-lived access token. The post notes the request format depends on the SaaS provider, with OAuth 2.0 token exchange (RFC 8693) and the JWT bearer grant (RFC 7523) as common choices, so the downstream service has to accept the federated identity. In the on-premises example, workloads connect over mutual TLS with an X.509-SVID issued through your AWS Private CA, and the service verifies it with the provider’s trust bundle.
Per the post, a JWT-SVID lasts up to one hour. An X.509-SVID defaults to 12 hours and is configurable from 1 to 12 hours. The IAM role session’s lifetime can be capped by the attesting service from 15 minutes to 12 hours. A 12-hour default is a long window if a certificate is stolen, so we would shorten it where mTLS peers allow.
A hardening checklist
These are our recommendations, not AWS guidance. The post only suggests that you can write your own attestation policy when a definition admits more workloads than you intend, and its S3 example requires both subject and issuer.
- Create the provider and one template per agent class, not one template for everything.
- Write attestation policies that name the cluster, namespace or AgentCore Runtime. Do not rely on the default alone, since we could not verify its scope.
- In every resource policy, not only the S3 example, pair
aws:OriginIdentity/Subjectwithaws:OriginIdentity/Issuer. - Keep the SVID audience specific to one downstream service so a stolen token is useful in one place.
- Search CloudTrail for the workload identifier in
onBehalfOf.subject, which the post says records the identifier alongside the role. Alert on an agent identifier appearing in a service it has never called. - Inventory the stored secrets your agents hold today and retire them as each integration moves to an SVID. The post’s closing suggestion points the same way: give an agent that uses a stored secret an identity and present its JWT-SVID in place of the secret. The inventory and retirement are our addition.
- Plan for what the preview may not cover. The post lists only EKS, AgentCore Runtime and AgentCore Gateway, so in our reading agents on other platforms keep their current credential risk.
What this does and does not fix
Identity narrows who an agent is and how long its credentials live. It does not change what a hijacked agent can do with the access it has. If a poisoned document steers an agent that is allowed to read payment records, the identity will faithfully authorize the read. We would pair this with scoped tool permissions and the input-side controls we have covered, and use the per-agent identifier in logs to make an agent’s behavior attributable.
References
Frequently Asked Questions
- What does AWS IAM agent and workload identity change for AI agents?
- Each agent or workload gets a unique, centrally managed identity, and AWS STS checks facts about it before issuing short-lived credentials. For AWS services the identity is attached to the workload's IAM role session. For non-AWS services the workload presents a JWT or an X.509 certificate instead of a stored secret. AWS describes the feature as a preview.
- Which platforms does the preview support?
- According to the AWS post, the preview supports workloads and agents on Amazon EKS, Amazon Bedrock AgentCore Runtime and Amazon Bedrock AgentCore Gateway. It is available at no additional charge in AWS commercial Regions. The post does not mention other hosting options, and in our reading they are not covered in the preview.
- Does a per-agent identity stop prompt injection?
- No. The post is about who the workload is and what it may reach, not about what the model decides to do. The post does not discuss prompt injection. In our view, a hijacked agent still holds whatever access its identity allows, which is why narrow policies and logging by workload identifier matter, and identity works as a blast-radius control next to input defenses, not instead of them.