ResourceInitializationError AWS Origin: Platform & cloud Last updated 14 Oct 2026

ECS: ResourceInitializationError: unable to pull secrets or registry auth

Fargate couldn’t fetch the task’s secrets (Secrets Manager/SSM) or registry credentials before starting containers.

Exact message you may see unable to pull secrets or registry authunable to retrieve secret from asmunable to retrieve secrets from ssm
Seen on: AWS

Meaning

The task execution role needs permission to read referenced secrets (and kms:Decrypt for customer keys), and the task needs a network path to Secrets Manager/SSM (NAT or VPC endpoints).

Common causes

  • Execution role lacks secretsmanager:GetSecretValue / ssm:GetParameters
  • Customer-managed KMS key not allowed
  • No route to Secrets Manager/SSM from private subnets
  • Secret ARN/name wrong

⚡ Quick fix

  1. Grant the execution role read access to those secrets (and KMS)
  2. Add VPC endpoints or NAT
  3. Check the secret ARN in the task definition

Detailed fix by platform

IAM

  1. { "Effect": "Allow", "Action": ["secretsmanager:GetSecretValue", "ssm:GetParameters", "kms:Decrypt"], "Resource": ["arn:aws:secretsmanager:eu-west-1:123456789012:secret:app/*"] }

How to diagnose

  1. Role — Execution role (not task role) policies
  2. Network — Endpoints/NAT
  3. ARN — Correct secret reference

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

AADSTS7000222 — AADSTS7000222: The provided client secret keys for app are expired (Azure)AADSTS7000222AccessDenied — AWS S3: AccessDenied (403) when calling GetObject / PutObject (AWS)AccessDeniedCannotPullContainerError — ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried (AWS)CannotPullContainerEr…CreateContainerConfigError — Kubernetes: CreateContainerConfigError — secret / configmap not found (Kubernetes)CreateContainerConfig…Essential container in task exited — ECS: Essential container in task exited (task keeps stopping) (AWS)Essential container i…IAM AccessDeniedException — AccessDeniedException: User: arn:aws:iam::... is not authorized to perform: service:Action on resource: ... (AWS)IAM AccessDeniedExcep…KMS AccessDenied kms:Decrypt — KMS: not authorized to perform: kms:Decrypt (or the key policy does not allow access) (AWS)KMS AccessDenied kms:…role cannot be assumed by Lambda — InvalidParameterValueException: The role defined for the function cannot be assumed by Lambda (AWS)role cannot be assume…ResourceI…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.