DEV Community

Cover image for πŸ” Amazon EKS Pod Identity Now Supports Cross-Account Access β€” Simplified & Code-Free
Latchu@DevOps
Latchu@DevOps

Posted on

πŸ” Amazon EKS Pod Identity Now Supports Cross-Account Access β€” Simplified & Code-Free

🎯 Use Case

Say you have

  • 🟦 EKS cluster in Account A
  • πŸ“¦ S3 bucket or DynamoDB table in Account B

Now, your pods in Account A can automatically access resources in Account B, securely and transparently.


βš™οΈ How It Works

Two IAM roles are involved

  • PodIdentityRole in Account A (used by EKS)
  • TargetResourceRole in Account B (with access to S3/DynamoDB)

Use the new create-pod-identity-association API to link them

aws eks create-pod-identity-association \
  --cluster-name my-cluster \
  --namespace finance \
  --service-account report-generator \
  --role-arn arn:aws:iam::<AccountA>:role/PodIdentityRole \
  --target-role-arn arn:aws:iam::<AccountB>:role/TargetResourceRole

Enter fullscreen mode Exit fullscreen mode

πŸ”„ EKS handles IAM role chaining behind the scenes

Your application running inside the pod:

  • Gets credentials automatically from the identity service
  • Doesn’t need to know about role assumptions or accounts
  • Keeps running as usual β€” securely accessing remote AWS services

🧠 Why It’s Cool

  • βœ… No code changes in your app
  • πŸ” Secure cross-account access via IAM
  • πŸ” Native support for role chaining
  • πŸ› οΈ Works with Cloud-native patterns
  • πŸ’Ό Ideal for multi-account enterprise setups

🧘 Real-World Benefit

Let’s say your app in EKS reads daily data from an S3 bucket in another business unit.
Now, with a single Pod Identity association, your pod gets credentials to access that bucket β€” securely and automatically.


πŸ” TL;DR

Amazon EKS Pod Identity now supports cross-account resource access using IAM role chaining β€” with just one API call and no app rewrites. 🎯


πŸ’¬ Are you running EKS in a multi-account setup?
How do you handle cross-account permissions today?

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.