How can I troubleshoot the "Runtime.InvalidEntrypoint" error for my Lambda function that's from a Docker image?

2 minutos de lectura

I received a "Runtime.InvalidEntrypoint" error when I try to create an AWS Lambda function from a Docker image.


When the entry in the Lambda function configuration is incorrect, you receive the Runtime.InvalidEntrypoint error.

To resolve this issue, check the following configuration settings for your Lambda function:

  • Verify that the ENTRYPOINT and CMD to your container image include the absolute path as the location. Also, the image can't contain a symlink as the ENTRYPOINT.

  • Make sure that the ENTRYPOINT is correct in the Lambda function's configuration. The ENTRYPOINT must match the command in the container's Dockerfile that's used for the runtime.

  • Verify that the container image is pushed to the correct Amazon Elastic Container Registry (Amazon ECR).

  • Make sure that the Docker image's architecture and the Lambda function are the same. Lambda supports arm64 and x86_64 instruction set architectures. When you're building the container image, be sure to use either the linux/amd64 or linux/arm64 platform.

    docker build platform linux/amd64 -t docker-image:test
  • When the Lambda deployment package doesn't have the correct security permissions, you receive a permission denied error along with the Runtime.InvalidEntrypoint error. To verify the correct permissions, see Unix permissions symbolic notation on the Wikipedia website. For all files within a Lambda deployment package, the correct permissions setting is 644. For folders within a deployment package, the correct permissions setting is 755. For more information, see How do I troubleshoot "permission denied" or "unable to import module" errors when I upload a Lambda deployment package?

Related information

How do I create a Lambda layer using a simulated Lambda environment with Docker?

Troubleshoot container image issues in Lambda

How do I use container images with Lambda?

OFICIAL DE AWSActualizada hace 24 días
2 comentarios

Recieved the error "rror: fork/exec / exec format error Runtime.InvalidEntrypoint"

Was able to resolve the error after adding respective architecture tag in docker file for runtime image "",

respondido hace 7 meses

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

profile pictureAWS
respondido hace 7 meses