Recieved the error "rror: fork/exec /lambda-entrypoint.sh: exec format error Runtime.InvalidEntrypoint"
Was able to resolve the error after adding respective architecture tag in docker file for runtime image "public.ecr.aws/lambda/python:3.11-x86_64",
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
@Nikhil Melakunta, thank so much for your solution!
Use the official AWS Lambda Node.js 18 base image
FROM public.ecr.aws/lambda/nodejs:18
Install g++ and other required dependencies
RUN yum update -y &&
yum install -y gcc-c++ make &&
yum clean all &&
rm -rf /var/cache/yum
Copy package files
COPY package*.json ./
Install dependencies
RUN npm install --production
Copy function code
COPY . .
Set the handler
ENTRYPOINT [ "/lambda-entrypoint.sh" ] CMD [ "src/handlers/dsa/run.handler" ]
this is my docker file my handler is at /Users/gouravsingal/Desktop/personal/slazySloth_server/src/handlers/dsa/run.js slazySloth_server is my project name
and I am getting this error
2024-12-07T16:49:33.279Z RequestId: 8e9c3920-cc3a-445e-998c-f0ea1c4d4746 Error: fork/exec /lambda-entrypoint.sh: exec format error Runtime.InvalidEntrypoint
can somebody correct it
I am using the correct image uri
Relevant content
- AWS OFFICIALUpdated 3 years ago
