Please help - Cannot login to ECR repository

config.yml

version: 2.1

orbs:
  aws-ecr: circleci/aws-ecr@8.1.2

jobs:
 build:
   machine:
    image: ubuntu-2204:2022.04.2
   steps:
     - checkout
    
     - run: |
         echo "$DOCKER_PASS" | aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 12345678910.dkr.ecr.us-east-1.amazonaws.com

workflows:
  build_and_push_image:
    jobs:
      - aws-ecr/build-and-push-image: # Use the pre-defined `build-and-push-image` job
          dockerfile: Dockerfile
          path: .
          profile-name: default
          aws-cli-version: latest
          repo: upbe
          region: ${AWS_REGION}
          registry-id: AWS_ECR_REGISTRY_ID
          tag: tag1 # default - latest

env variable:
ACCESS_KEY_ID
AWS_DEFAULT_REGION
AWS_ECR_ACCOUNT_URL
AWS_ECR_REGISTRY_ID
AWS_REGION
REGISTRY_ID
SECRET_ACCESS_KEY

Can you please post some more detail?

At the moment you seem to have a job that is using aws ecr in a shell and a workflow that is using the aws-ecr orb within the config.yml you have posted.

I am guessing that you are asking about the ORB usage. While I have not used this orb, its document indicates that it will by default be looking for the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, while your env list indicates that you have ACCESS_KEY_ID and SECRET_ACCESS_KEY defined.