EKS agent and workload identity Two pods share one IAM role. Amazon S3 allows only the pod whose workload identity the bucket policy names. AWS Cloud Region us-east-1 Existing Amazon EKS cluster quickstart.py boto3, no kubectl AWS IAM provider and template One IAM role shared, no permissions Pod agent-a own service account Pod agent-b own service account Pod Identity Agent on each node Amazon S3 bucket policy names agent-a AWS CloudTrail AssumeRole events GetObject allowed GetObject AccessDenied 1 2 3 4 5 6 7 1 2 3 4 5 6 7 LINES Setup by the script Credentials with identity Allowed request Denied request Audit FLOW The script creates a workload identity provider and a template in IAM. It creates one IAM role with no permissions, and a bucket whose policy names agent-a. It creates two Pod Identity associations with workloadIdentityConfig, and two pods. The Pod Identity Agent gives each pod role credentials that carry its SPIFFE ID. agent-a reads the object: its identity matches the bucket policy. agent-b uses the same role and gets AccessDenied. CloudTrail records the role sessions. The script then deletes what it made.