Use agent and workload identity with AWS services
Agent and workload identity is in preview release for AWS Identity and Access Management (IAM) and is subject to change.
AWS services that run your workloads attest them and deliver their credentials. You don't install anything for managed services. On Amazon Elastic Kubernetes Service (Amazon EKS), the EKS Pod Identity Agent does this work on the cluster.
Topics
How a service uses your template
Each service stores a reference to a template on its own resource, such as a Pod Identity association, an agent runtime, or a gateway. The reference is always explicit. IAM never chooses a template for you.
You associate the reference. When you configure the resource, you choose a template. In the service's console, you can also let the console create a template from the service's definition. Before storing it, the service checks that you're allowed to pass it (
iam:PassWorkloadIdentityTemplate). For more information, see Permission to assign a template.The service attests at runtime. When a workload starts, the service sends its facts and the stored reference to AWS Security Token Service (AWS STS).
The service delivers credentials. It assumes the workload's role with the identity attached and gives the workload its credentials. It renews them before they expire.
Supported services
Service |
Attestation |
Template definitions |
Default identifier |
|---|---|---|---|
Amazon EKS |
EKS control plane. The Pod Identity Agent delivers credentials. |
|
Region, cluster, namespace, and service account |
AgentCore runtime, a capability of Amazon Bedrock AgentCore |
AgentCore control plane |
|
Region, runtime name, and runtime ID. The session definitions also add the session ID. |
AgentCore Gateway, a capability of Amazon Bedrock AgentCore |
AgentCore control plane |
|
Region, gateway name, and gateway ID |
Each service guide also describes its own setup. For Amazon EKS, see IAM for agents in EKS in the Amazon EKS User Guide. For AgentCore runtime, see Agent and workload identity for AgentCore Runtime (preview), and for AgentCore Gateway, see Set up workload identity for a gateway, in the Amazon Bedrock AgentCore Developer Guide.
Find templates for a service
A service console lists the templates whose attestation policy names that service. You can run the same query:
aws iam list-workload-identity-templates \ --workload-identity-provider-arn arn:aws:iam::111122223333:workload-identity-provider/payments-prod \ --resource-scope ACCOUNT \ --filter 'service_principal = "bedrock-agentcore.amazonaws.com"'
If the list is empty, the console offers to create a template from the service's definition. If there's more than one, it asks you to choose.