A PVC stays `Pending` with `waiting for a volume to be created, either by external provisioner "ebs.csi.aws.com" or manually created by system administrator`.
IntermediateTroubleshootingECS, EKS, ECR and Lambda
Answer
Likely causes → The EBS CSI driver add-on is not installed, or its controller has no IAM permissions (no IRSA or Pod Identity role with AmazonEBSCSIDriverPolicy). Or the StorageClass uses WaitForFirstConsumer and no pod has been scheduled yet, which is normal.
Diagnose →
kubectl describe pvc data-db-0 -n prod
aws eks describe-addon --cluster-name prod --addon-name aws-ebs-csi-driver --query 'addon.[status,serviceAccountRoleArn]'
kubectl -n kube-system logs deploy/ebs-csi-controller -c csi-provisioner | tail -20
kubectl get sc
Fix →
aws eks create-addon --cluster-name prod --addon-name aws-ebs-csi-driver \
--service-account-role-arn arn:aws:iam::111111111111:role/ebs-csi-role
If the volumes are KMS-encrypted, add KMS permissions for that key to the role.
Prevent → Install CSI drivers as managed add-ons with their roles in IaC, and set a default gp3 StorageClass.
More on ECS, EKS, ECR and Lambda
`docker push 111111111111.dkr.ecr.us-east-1.amazonaws.com/api:1.4` fails with `no basic auth credentials` (or `denied: Your authorization token has expired. Reauthenticate and try again.`).BeginnerFargate tasks stop with `CannotPullContainerError: pull image manifest has been retried 5 time(s): failed to resolve ref ... dial tcp 52.x.x.x:443: i/o timeout`.Intermediate`ResourceInitializationError: unable to pull secrets or registry auth: ... AccessDeniedException: User: arn:aws:sts::111111111111:assumed-role/ecsTaskExecutionRole/... is not authorized to perform: secretsmanager:GetSecretValue`.IntermediateA task stops with `Essential container in task exited`, exit code 137, and reason `OutOfMemoryError: Container killed due to memory usage`.BeginnerThe ECS service event says `service api was unable to place a task because no container instance met all of its requirements. The closest matching container-instance ... has insufficient memory available.`IntermediateAn ECS deployment rolls back automatically, and the event says `deployment failed: tasks failed to start` from the circuit breaker.Advanced