EKS pods need access to S3 without node-level permissions. How?
IntermediateScenarioECS, EKS, Lambda and ECR
Answer
Situation read → IAM roles for service accounts or EKS Pod Identity.
What I'd do →
- With Pod Identity: install the agent add-on, then
aws eks create-pod-identity-association --cluster-name prod --namespace app --service-account s3-reader --role-arn arn:aws:iam::111111111111:role/s3-reader - Annotate nothing, pods use the SDK default chain
- Role trusts
pods.eks.amazonaws.com - Verify with
aws sts get-caller-identityinside the pod
Why → Per-pod roles enforce least privilege instead of every pod inheriting the node role.
Interview tip → IRSA still works; Pod Identity is simpler across clusters.
More on ECS, EKS, Lambda and ECR
ECS on Fargate or on EC2: how do you choose?BeginnerDeploy a containerized API on ECS behind an ALB. What are the building blocks?BeginnerAn ECS service deployment is stuck, tasks start and stop repeatedly. How do you debug?IntermediateRoll out a new ECS service version with canary and automatic rollback.IntermediateUpgrade an EKS cluster from 1.31 to 1.33 safely.IntermediateDesign node scaling for EKS with mixed Spot and On-Demand and fast scale-up.Advanced