I’ve got two projects, both of which build a docker image and then push that image to ECR. One project builds and pushes successfully, but the other fails when trying to obtain an ecr login with:
An error occurred (UnrecognizedClientException) when calling the GetAuthorizationToken operation: The security token included in the request is invalid.
they are both using project specific env variables to specify the key and secret, for the specific circleci iam user, and I’d copied the variables from the project that builds successfully into the one that is not.
Below is the run commands within my config file:
aws configure set aws_access_key_id $AWS_KEY
aws configure set aws_secret_access_key $AWS_SECRET
aws configure set default.region us-east-1
aws configure set default.output json
login="$(aws ecr get-login --no-include-email --region us-east-1)"
${login}
docker build -f Dockerfile_prod --cache-from app -t app .
I do not have AWS Permissions set for either one of the projects, just the same project specific environment variables.
Any ideas? TIA