View a markdown version of this page

IAM: Allow turning on agent and workload identity from the Amazon EKS and AgentCore consoles - AWS Identity and Access Management

IAM: Allow turning on agent and workload identity from the Amazon EKS and AgentCore consoles

Preview release

Agent and workload identity is in preview release for AWS Identity and Access Management (IAM) and is subject to change.

This example policy lets a platform administrator turn on agent and workload identity from the Amazon Elastic Kubernetes Service (Amazon EKS) and Amazon Bedrock AgentCore consoles. The console creates a template from the service's own template definition, and the service then stores the template on its resource. The iam:PassedToService condition limits which services can receive a template. This policy doesn't limit how a template is built, so the administrator can also create templates with a custom path pattern and attestation policy. The administrator also needs the service's own permissions, such as eks:CreatePodIdentityAssociation. To create templates under an organization-level provider, also allow iam:AssociateWorkloadIdentityTemplate on the provider.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "CreateTemplates", "Effect": "Allow", "Action": [ "iam:CreateWorkloadIdentityTemplate", "iam:PutWorkloadIdentityTemplateAttestationPolicy" ], "Resource": "*" }, { "Sid": "FindProvidersAndTemplates", "Effect": "Allow", "Action": [ "iam:GetWorkloadIdentityProvider", "iam:ListWorkloadIdentityProviders", "iam:GetWorkloadIdentityTemplate", "iam:GetWorkloadIdentityTemplateAttestationPolicy", "iam:ListWorkloadIdentityTemplates" ], "Resource": "*" }, { "Sid": "PassTemplatesToServices", "Effect": "Allow", "Action": "iam:PassWorkloadIdentityTemplate", "Resource": "*", "Condition": { "StringEquals": { "iam:PassedToService": ["pods.eks.amazonaws.com", "bedrock-agentcore.amazonaws.com"] } } } ] }