Localstack Pro: Can't push to ECR

Hi there,

I’m running localstack pro inside of docker, and provisioning infrastructure via Pulumi.

Here is my docker-compose.yaml:

version: '3.8'

services:
  localstack:
    container_name: localstack
    image: localstack/localstack-pro:2.1-arm64
    ports:
      - "4510-4559:4510-4559"
      - "53:53"
      - "4566-4584:4566-4584"  # LocalStack Gateway
    networks:
      - common
    environment:
      - DEBUG=${DEBUG-}
      - AWS_ACCESS_KEY_ID=localstack-key-id
      - AWS_SECRET_ACCESS_KEY=localstack-key
      - AWS_REGION=us-east-1
      - DOCKER_HOST=unix:///var/run/docker.sock
      - KMS_PROVIDER=local-kms
      - SERVICES=s3,sqs,sns,kms,secretsmanager,ecr
      - PERSISTENCE=1
      - LOCALSTACK_API_KEY=${LOCALSTACK_API_KEY}
    volumes:
      - "./.localstack/data:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

networks:
  common:
    name: common
    driver: bridge

Here is my Pulumi code:

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const repo = new aws.ecr.Repository("keybox/service-gateway", {
  imageTagMutability: "MUTABLE",
});

Here is the output from localstack pro’s docker container:

localstack  | 2023-07-04T20:49:04.127  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS s3.ListObjects => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.143  INFO --- [   asgi_gw_1] localstack.request.aws     : AWS s3.HeadObject => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.146  INFO --- [   asgi_gw_0] localstack.request.aws     : AWS s3.HeadObject => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.150  INFO --- [   asgi_gw_2] localstack.request.aws     : AWS s3.HeadObject => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.154  INFO --- [   asgi_gw_3] localstack.request.aws     : AWS s3.HeadObject => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.158  INFO --- [   asgi_gw_4] localstack.request.aws     : AWS s3.HeadObject => 404 (NoSuchBucket)
localstack  | 2023-07-04T20:49:04.169  INFO --- [   asgi_gw_1] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:04.170  INFO --- [   asgi_gw_2] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:04.171  INFO --- [   asgi_gw_0] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:04.172  INFO --- [   asgi_gw_4] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:04.172  INFO --- [   asgi_gw_3] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:09.214  INFO --- [   asgi_gw_3] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:09.217  INFO --- [   asgi_gw_4] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:09.218  INFO --- [   asgi_gw_1] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:09.219  INFO --- [   asgi_gw_2] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200
localstack  | 2023-07-04T20:49:09.220  INFO --- [   asgi_gw_0] localstack.request.http    : POST /v2/keybox/service-gateway/blobs/uploads/ => 200

Note the S3 404s, I am thinking that is related. Docker continues retrying the same layers over and over when I push.

Any help here would be great. I don’t see anything missing from your ECR documentation, the docs say I should be able to simply create the ECR repo and push to it.

Hi @keybox-andrew,

Can you please use the default docker-compose.yml, and follow the ECR documentation with AWS CLI commands and let us know if the deployment works as expected?
Thanks.