An EKS Pod Needs AWS Access. Attach It to the Node Role?
A pod needs to read S3, and a teammate wants to add the permission to the EKS node role to unblock it. Defend the least-privilege approach.
Answer key reviewed by Branko Petric
Read first: AWS IAM: Users, Roles, and Policies
Your decision
A pod in your EKS cluster needs to read from S3. A teammate says just add the S3 permission to the node instance role so the pod can use it immediately. Do you agree, and what should you do instead?
The situation
A new pod in your EKS cluster needs to read objects from an S3 bucket. Right now it has no AWS permissions, so its calls fail, and the team wants it working today.
Context
The cluster nodes run with an instance role used for core cluster functions. The cluster already has an OIDC provider available. A teammate proposes simply attaching an S3 read policy to the node instance role, since the AWS SDK inside the pod will pick those credentials up automatically from instance metadata with no extra setup.
Related challenges
- A Container in Prod Is Mining Crypto
A pod is pegging CPU running a crypto miner. A teammate wants to kubectl delete it and move on. Defend the real response.
- ArgoCD Says OutOfSync Forever. Ignore the Secret Diff and Move On?
A third-party Helm chart moved to ArgoCD now shows OutOfSync forever, resets its admin password and broke its database and agents after one sync. Defend the real fix over the shortcuts.
- Every Rolling Deploy Causes 502s. Add Ingress Retries?
Each rolling deploy causes a burst of 502s at the load balancer. A teammate wants ingress retries and night-only deploys. Defend the real fix.
- Pods Keep OOMKilling: Scale Up or Fix the Leak?
A service OOMKills every few hours. Adding replicas or raising memory limits buys time. Defend whether to scale around it or fix the root cause.