17

Is it currently possible to use a public ECR image to deploy a lambda? I have tried to create a public ECR image but I see an error in the web interface. I'm seeing an error: "This is an invalid Elastic Container Registry Image URI"

Dockerfile:


FROM public.ecr.aws/lambda/nodejs:12
# Alternatively, you can pull the base image from Docker Hub: amazon/aws-lambda-nodejs:12

COPY app.js package.json /var/task/

# Install NPM dependencies for function
RUN npm install

# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD [ "app.handler" ]

enter image description here

0

1 Answer 1

25

It's not possible to do this today, but that could change in the future. For now, your function must use an ECR private repository in the same region and account as the function.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.