Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a public ECR image for lambda function

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

like image 715
motatoes Avatar asked Dec 15 '25 05:12

motatoes


1 Answers

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.

like image 132
Nick C Avatar answered Dec 16 '25 20:12

Nick C



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!