# Sample pod running AWS Python SDK with web federated identity provider as credential provider *When building containers in pods that uses AWS SDK, it is recommended to use IAM roles for service accounts to provide authentication for the pods.* *When using [IAM roles for service accounts](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html), the containers in your pods must use an AWS SDK version that supports assuming an IAM role through an OpenID Connect web identity token file.* ## Pre-requisite * An existing AWS EKS Cluster. * Install latest [aws-cli](https://docs.aws.amazon.com/cli/latest/userguide/installing.html). * Install latest [eksctl](https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html) * The following versions, or later, for your [AWS SDK](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts-minimum-sdk.html): ## Steps Summary: - Configure IRSA - refer to steps in [here](https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) - Create Service Account in the Cluster e.g `aws-sdk` - Annotate the Kubernetes `serviceAccountName: aws-sdk` with the IAM role - Deploy pods to use a Kubernetes service account ## Getting Started 1. Create Namespace ``` kubectl create namespace my-namespace e.g. kubectl create namespace serverless ``` 2. Create a file that includes the permissions for the AWS services that you want your pods to access. ``` cat >my-policy.json <trust-relationship.json <