Use custom lambda runtime derived from official images

I have created a docker image locally (not published to any container registry) using the official public.ecr.aws/lambda/python:3.11 image.

I am trying to make localstack use this local image while creating/executing the lambda function. It currently tries to pull this image from the container registry which causes an error.

Is it possible to use this local image without having to push it to a container registry?

I am running localstack using docker-compose with the following configuration.

version: "3.8"

services:
  localstack:
    container_name: "${LOCALSTACK_DOCKER_NAME-localstack-main}"
    image: localstack/localstack:3.0.0-arm64
    ports:
      - "127.0.0.1:4566:4566"
      - "127.0.0.1:4510-4559:4510-4559"
    environment:
      - DEBUG=${DEBUG-1}
      - DOCKER_HOST=unix:///var/run/docker.sock
      - LAMBDA_RUNTIME_IMAGE_MAPPING={"python3.11":"st/lambda:python3.11"}
    volumes:
      - "${LOCALSTACK_VOLUME_DIR:-$HOME/Library/Caches/localstack/volume}:/var/lib/localstack"
      - "/var/run/docker.sock:/var/run/docker.sock"

Hello @frankshrestha,

You should be able to use the LocalStack ECR in a LocalStack paid offering (pro), and from there you can access your custom lambda containers. You can find a sample in our repository localstack/localstack-pro-samples (github.com).