question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logging in to public.ecr.aws stopped working on v1.11.0

See original GitHub issue

Behaviour

After v.1.11.0 release our CI has started to fail when trying to log in to the ECR. Pinning action back to v.1.10.0 fixes the issue.

Steps to reproduce this issue

  1. Run github action

Expected behaviour

Logging in to the ECR should succeed.

Actual behaviour

An error with following logs:

Retrieving registries data through AWS SDK...
AWS Public ECR detected with us-east-1 region
Error: The security token included in the request is invalid.

Configuration

name: Production deployment

on: [push]

jobs:
  production-job:
    name: Build and deploy the image
    runs-on: self-hosted
    container: docker

    steps:
      - name: Check out repository code
        uses: actions/checkout@master

      - name: Configure AWS credentials
        uses: aws-actions/configure-aws-credentials@v1
        with:
          aws-region: ${{ secrets.AWS_REGION }}
          role-to-assume: ${{ secrets.AWS_ROLE_ARN }}
          role-external-id: ${{ secrets.AWS_EXTERNAL_ID }}
          role-duration-seconds: 1500

      - name: Install the latest AWS CLI
        run: |
          apk add --no-cache python3 py3-pip
          pip3 install --upgrade pip
          pip3 install awscli

      - name: Log in to Amazon public ECR
        uses: docker/login-action@v1
        with:
          registry: public.ecr.aws
        env:
          AWS_REGION: us-east-1

Logs

Attached

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
AyrtonRicardocommented, Dec 20, 2021

@crazy-max it seems to be working with @test version.

Output:

Retrieving registries data through AWS SDK...
AWS ECR detected with eu-central-1 region
Logging into {VERY_NICE_HIDDEN_REGISTRY}...
Login Succeeded!

2reactions
crazy-maxcommented, Dec 20, 2021

@TheMacies Thanks for your feedback. After investigation it could be linked to an issue with region. Will come back to you shortly.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting errors with Docker commands when using ...
In some cases, running a Docker command against Amazon ECR may result in an error message. Some common error messages and potential solutions...
Read more >
Amazon ECR Public troubleshooting - AWS Documentation
This chapter helps you find diagnostic information for Amazon ECR Public, and provides troubleshooting steps for common issues and error messages.
Read more >
Logging Amazon ECR Public actions with AWS CloudTrail
When activity occurs in Amazon ECR Public, that activity is recorded in a CloudTrail event along with other AWS service events in Event...
Read more >
Troubleshooting Amazon ECR error messages
This indicates that your user does not have permissions granted to use Amazon ECR, or that those permissions are not set up correctly....
Read more >
Troubleshooting Amazon ECR identity and access
If the AWS Management Console tells you that you're not authorized to perform an action, then you must contact your administrator for assistance....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found