Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to obtain authorization token to log in to ECR #483

Closed
EricKao opened this issue Sep 22, 2022 · 3 comments
Closed

Failed to obtain authorization token to log in to ECR #483

EricKao opened this issue Sep 22, 2022 · 3 comments

Comments

@EricKao
Copy link

EricKao commented Sep 22, 2022

Describe the bug
When we use AWS Toolkit on Azure DevOps, we would like to push a docker image to AWS ECR, for some reason, it's always show below error messages, and we can't continue running the reset of automation process, we've confirmed the service connection is set correctly and the ECRPushImage version is 1.3.

##[error]Error: Failed to obtain authorization token to log in to ECR, error: CredentialsError: Missing credentials in config, if using AWS_CONFIG_FILE, set AWS_SDK_LOAD_CONFIG=1

To reproduce

  1. Create a new service connection of type AWS, and fill in related ECR credientials.
  2. Use AWS ECR Push task in the pipeline YAML file.
  3. Each time when running push docker image part, it will show failed to obtain authorization token to log in to ECR.

Expected behavior

It should get authorization successfully and push docker image to the ECR.

Your Environment

  • On-prem or cloud based?: Cloud
  • Azure DevOps version:
  • AWS Toolkit for Azure DevOps version: 1.13.0
@EricKao
Copy link
Author

EricKao commented Sep 22, 2022

Fixed this issue by setting the correct permission role on AWS, close this issue.

@EricKao EricKao closed this as completed Sep 22, 2022
@amantcs
Copy link

amantcs commented Dec 16, 2022

@EricKao What permissions you added? I am also getting the same issue in a particular region only.

@rowanfreeman-acutro
Copy link

@EricKao What permissions you added? I am also getting the same issue in a particular region only.

This solution worked for me when it's region-specific: #547 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants