A long build fails at the final step with "denied: Your authorization token has expired. Reauthenticate and try again." when pushing to ECR.
IntermediateTroubleshootingPipeline outages
Answer
Likely causes → ECR login tokens last 12 hours. Either the pipeline logged in at the very start of a long job, the agent reuses a stored ~/.docker/config.json from an old login, or the OIDC/assumed-role session (often 1 hour) expired before the push.
Diagnose → Check when docker login / aws ecr get-login-password ran relative to the push, and check the session duration of the assumed role.
Fix → Log in right before pushing:
aws ecr get-login-password --region ap-south-1 | docker login --username AWS --password-stdin 123456789012.dkr.ecr.ap-south-1.amazonaws.com
docker push 123456789012.dkr.ecr.ap-south-1.amazonaws.com/app:$GIT_SHA
Increase role-duration-seconds if the job needs longer than an hour.
Prevent → Use the amazon-ecr-credential-helper so Docker fetches tokens on demand, and keep auth as the last step before push.
More on Pipeline outages
Every GitHub Actions job in the org sits at "Waiting for a runner to pick up this job..." for 30 minutes.BeginnerJenkins builds on one agent fail with "java.io.IOException: No space left on device" while checking out code.BeginnerA deploy workflow that worked yesterday fails at `aws-actions/configure-aws-credentials` with "Not authorized to perform sts:AssumeRoleWithWebIdentity".IntermediateEvery pipeline in the company fails at the dependency step with "npm ERR! 503 Service Unavailable" (or PyPI/Maven timeouts) because an upstream registry is having an outage.Intermediate`terraform apply` in CI fails with "Error acquiring the state lock: ConditionalCheckFailedException" and shows a lock from a pipeline run that was cancelled two hours ago.BeginnerArgo CD shows the `payments` app permanently `OutOfSync` and self-heal keeps fighting: replicas jump between 3 and 12 every few minutes.Intermediate