Technical questionAccepted answer
Lambda container images complain about entrypoint needing handler name as the first argument
bjfletcher
Dec 2
0 views1
When I run an AWS Lambda container (Docker) image, for example:
docker run public.ecr.aws/lambda/java bash
I get the following error:
entrypoint requires the handler name to be the first argument
What should the handler name be?
1 answer
Accepted answer · original discussion
bjfletcher
PermalinkDec 2
It depends what the language is of the runtime. For example, if it is NodeJS, then the handler name should look like:
"app.handler"
If it is Java, then it should look like:
"com.example.LambdaHandler::handleRequest"
The image will look for them in LAMBDA_TASK_ROOT so you will need to make sure that your code (or compiled code) is copied to that folder when you build the image, for example:
COPY target/* ${LAMBDA_TASK_ROOT}
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.