Jenkins Amazon ECR Plugin login issue "Authorization Token has expired" Jenkins Amazon ECR Plugin login issue "Authorization Token has expired" jenkins jenkins

Jenkins Amazon ECR Plugin login issue "Authorization Token has expired"


I always use this command as the first step in my Jenkins jobs for login to ECR:

aws ecr get-login --no-include-email --profile ecr | bash

where "--profile ecr" is predefined profile in Jenkins (.asw/config, .aws/credentials)


If you set the variable env.AWS_ECR_LOGIN=true in your pipeline, the issue is resolved. It is something on the docker.withregistry step:https://issues.jenkins-ci.org/browse/JENKINS-44143