Quantcast
Channel: Active questions tagged aws-lambda - Stack Overflow
Viewing all articles
Browse latest Browse all 4012

Docker pull from public.ecr.aws results in "403 Forbidden" error

$
0
0

I'm attempting to build a Docker image on my Mac M1 machine using the public.ecr.aws/lambda/python:3.8 image from Amazon ECR Public as the base image in my Dockerfile. However, I'm encountering the following error during the image pull process:

ERROR: failed to solve: public.ecr.aws/lambda/python:3.8: pulling from host public.ecr.aws failed with status code: 403 Forbidden

Here's the relevant portion of my Dockerfile:

FROM public.ecr.aws/lambda/python:3.8COPY requirements.txt  .RUN  pip3 install -r requirements.txt --target "${LAMBDA_TASK_ROOT}"COPY app.py ${LAMBDA_TASK_ROOT}CMD [ "app.handler" ]

i tried all the things like running build or buildx build --platform linux/amd64 command but no luck.

i tried directly from python:slim and i got result but i want to use public ecr.


Viewing all articles
Browse latest Browse all 4012

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>