Search code examples
amazon-web-servicesamazon-iamamazon-eks

EKS Pod with Multiple IAM Roles


Is it possible for a pod to assume multiple IAM roles? Its definitely possible to dynamically switch the env variable AWS_ROLE_ARN value. But do we have a straight approach to support multiple at a time?

like,

AWS_ROLE_ARN: test
AWS_ROLE_ARN2: test-2


Solution

  • As you can read in the documentation, IAM roles for pods are working like instance profile for EC2. So you can't use easily 2 roles at the same time.

    Source : https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html