EKS EBS CSI driver cannot create volumes: NoCredentialProviders
could not create volume in EC2: NoCredentialProviders: no valid providers in chainShort answer
The EBS CSI controller pod has no AWS credentials. With IAM roles for service accounts that means one of three gaps: no IAM OIDC provider for the cluster, no role attached to the aws-ebs-csi-driver add-on, or a trust policy whose audience or subject does not match the ebs-csi-controller-sa service account.
Fix it fast
1Find out which cause you have
Read the PVC events to confirm it is a credentials error, then check whether the service account carries a role.
kubectl describe pvc <pvc-name> kubectl -n kube-system get sa ebs-csi-controller-sa -o yaml2Match what you see, then jump to its fix
- 1
The service account has a role annotation, but the role can never be assumedThe cluster has no IAM OIDC providerFix - 2
The ebs-csi-controller-sa service account has no role ARN, or the role was never createdNo IAM role is attached to the EBS CSI add-onFix - 3
The role exists and is attached, but the controller still has no credentialsThe role's trust policy does not match the service accountFix
- 1
What does the error look like?
could not create volume in EC2: NoCredentialProviders: no valid providers in chainfailed to provision volume with StorageClass
Cause 1 of 3
The cluster has no IAM OIDC provider
1Check
IAM roles for service accounts need an IAM OIDC provider for the cluster's issuer URL. Compare the issuer ID with the providers in your account.
oidc_id=$(aws eks describe-cluster --name <cluster> --query "cluster.identity.oidc.issuer" --output text | cut -d '/' -f 5)
aws iam list-open-id-connect-providers | grep $oidc_id | cut -d "/" -f42Fix
If the check prints nothing, create the provider for the cluster.
eksctl utils associate-iam-oidc-provider --cluster <cluster> --approve3Verify
Run the check again and see the provider ID printed. Then retry the claim and read its events.
kubectl describe pvc <pvc-name>Confirmed by docs.aws.amazon.com
Cause 2 of 3
No IAM role is attached to the EBS CSI add-on
1Check
Without the IAM permissions the plugin cannot call AWS APIs. AWS notes that skipping the role step makes provisioning fail on the PVC. Look for the role annotation on the service account.
kubectl -n kube-system get sa ebs-csi-controller-sa -o jsonpath='{.metadata.annotations}'2Fix
Create a role for the driver with the AWS managed policy AmazonEBSCSIDriverPolicyV2, then give the add-on that role.
aws iam attach-role-policy \
--policy-arn arn:aws:iam::aws:policy/AmazonEBSCSIDriverPolicyV2 \
--role-name AmazonEKS_EBS_CSI_DriverRole
aws eks update-addon --cluster-name <cluster> --addon-name aws-ebs-csi-driver \
--service-account-role-arn arn:aws:iam::<account-id>:role/AmazonEKS_EBS_CSI_DriverRole3Verify
Wait for the add-on update, then retry the PVC.
kubectl get pvc <pvc-name>Confirmed by docs.aws.amazon.com
Cause 3 of 3
The role's trust policy does not match the service account
1Check
The trust policy must allow sts:AssumeRoleWithWebIdentity from the cluster's OIDC provider, with the audience sts.amazonaws.com and the subject system:serviceaccount:kube-system:ebs-csi-controller-sa.
aws iam get-role --role-name AmazonEKS_EBS_CSI_DriverRole --query Role.AssumeRolePolicyDocument2Fix
Correct the Federated principal, the :aud and the :sub lines so they use your cluster's OIDC provider ID.
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"oidc.eks.<region>.amazonaws.com/id/<OIDC-ID>:aud": "sts.amazonaws.com",
"oidc.eks.<region>.amazonaws.com/id/<OIDC-ID>:sub": "system:serviceaccount:kube-system:ebs-csi-controller-sa"
}
}3Verify
Retry the claim and read its events.
kubectl describe pvc <pvc-name>Confirmed by docs.aws.amazon.com
How do I stop it coming back?
- Create the IAM OIDC provider as part of cluster creation, in the same infrastructure code.
- Create the driver role and the add-on together, so the add-on never runs without a role.
- Use a custom KMS key policy on the role when volumes are encrypted with your own key.
- AWS suggests EKS Pod Identity for new setups; it avoids the OIDC trust policy entirely.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- RaheebA consumer app shipped to both stores from one Flutter codebase on a .NET and Azure back end.
- Loade DriverThe driver side of a delivery platform: live jobs, routing and earnings, past 5K Google Play downloads.
Related fixes
Servers
Status code 460 on an AWS Application Load Balancer
elb_status_code 460 in ALB access logs
A 460 is generated by the load balancer, not by your app.
3 causes, each with a fixServers
Application Load Balancer returns 504 for requests to EC2 instances
HTTPCode_ELB_504_Count
A 504 from an Application Load Balancer means it could not get an answer from a target in time.
4 causes, each with a fixServers
Apache has a certificate, but https:// does not open
No line with :443 in the output of ss -ltnp
HTTPS needs four things at once: mod_ssl loaded, Apache listening on 443, a virtual host on 443 with SSLEngine on, and a firewall that lets 443 in.
4 causes, each with a fixServers
aws emr --steps fails: Error parsing parameter, Expected '=', received 'EOF'
Error parsing parameter '--steps': Expected: '=', received: 'EOF' for input:
The AWS CLI tried to read your option as shorthand key=value pairs and ran out of text where it expected an equals sign.
3 causes, each with a fixServers
AWS CLI says you must specify a region
You must specify a region. You can also configure your region by running "aws configure".
The AWS CLI sends every request to one region and has none to use.
4 causes, each with a fixServers
docker login to Amazon ECR fails with: Cannot perform an interactive login from a non TTY device
Cannot perform an interactive login from a non TTY device
Docker asked for a password because none reached it, and a pipe or script has no keyboard to answer.
3 causes, each with a fix