title: Unable to access ecr repository in my registry when deploying aws lambda function
body: <p><strong>Problem Statement:</strong></p>
  <p>I am trying to use a built docker container image and use that as the source for an AWS lambda function. However, whenever I build the lambda function and deploy it, I am getting this error every time.</p>
  <pre><code>The repository with name 'xxxxxxxxx' does not exist in the registry 
  with id '########'.
  </code></pre>
  <p>I did some sanity checks to make sure that my serverless.yml file was created correctly, with the correct spelling, and that this repository actually exists in ECR.</p>
  <pre class="lang-yaml prettyprint-override"><code>serverless.yml
  provider:
    name: aws
    runtime: python3.8
    stage: ${env:BRANCH_NAME}
    region: us-west-2
    role: arn:aws:iam::#########:role/current-role
    vpc:
      securityGroupIds:
        - ${env:SG_ID}
      subnetIds:
        - ${env:SUBNET_ID}
    tracing:
      lambda: true
    environment:
      REGION_NAME: us-west-1
      PYTHONPATH: '/var/task/packages:/var/runtime'
      S5_QUEUE_URL: ${env:S5_QUEUE_URL}
      SECRET_NAME: ${env:SECRET_NAME}
    iamRoleStatements:
      - Effect: Allow
        Action:
          - 'ecr:SetRepositoryPolicy'
          - 'ecr:GetRepositoryPolicy'
        Resource: 'arn:aws:ecr:us-west-2:########:xxxxxxxxx/directory/'
  functions:
    function1:
      image: '#######.dkr.ecr.us-west-2.amazonaws.com/xxxxxxxxx/directory:tag'
    
  </code></pre>
  <p>However, for some reason, I still am unable to access this repository, no matter what changes
  I have made it to my serverless.yml file. At first, I assumed, this might be a permissions issue, but I don't see any problem with my permissions declared...Can someone help?</p>