Last active
July 20, 2020 04:10
-
-
Save holypriest/dfbe7a55a777a59d39548336484a2356 to your computer and use it in GitHub Desktop.
AssumeRole policy to allow Kubernetes ServiceAccounts to access AWS resources
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "", | |
"Effect": "Allow", | |
"Principal": { | |
"Federated": "arn:aws:iam::<your-aws-account>:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/<oidc-of-your-eks-cluster>" | |
}, | |
"Action": "sts:AssumeRoleWithWebIdentity", | |
"Condition": { | |
"StringEquals": { | |
"oidc.eks.us-east-1.amazonaws.com/id/<oidc-of-your-eks-cluster>:sub": [ | |
"system:serviceaccount:airflow-on-k8s:workers-sva", | |
"system:serviceaccount:airflow-on-k8s:tasks-sva" | |
] | |
} | |
} | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment