amazon/aws-lambda-nodejs

Verified Publisher

By Amazon Web Services

Updated 1 day ago

AWS Lambda base images for NodeJS

Image
Languages & frameworks
Integration & delivery
54

5M+

amazon/aws-lambda-nodejs repository overview

About

AWS provided base images for Lambda contain all the required components to run your functions packaged as container images on AWS Lambda. These base images contain the Amazon Linux Base operating system, the runtime for a given language, dependencies and the Lambda Runtime Interface Client (RIC), which implements the Lambda Runtime API. The Lambda Runtime Interface Client allows your runtime to receive requests from and send requests to the Lambda service.

To learn more about the composition of the base images you can visit https://github.com/aws/aws-lambda-base-images.

Maintenance policy

AWS will regularly provide security patches and other updates for these base images. These images are similar to the AWS Lambda execution environment on the cloud to allow customers to easily packaging functions to the container image. However, we may choose to optimize the container images by changing the components or dependencies included. When deployed to AWS Lambda these images will be run as-is.

Usage

You can get started by using these images in your Dockerfile and coping your function code into the /var/task folder in your image.

Example Dockerfile below:

FROM public.ecr.aws/lambda/nodejs:12

# Copy function code
COPY app.js ${LAMBDA_TASK_ROOT}

# Set the CMD to your handler (could also be done as a parameter override outside of the Dockerfile)
CMD [ "app.handler" ]

You can then locally test your function using the docker build and docker run commands.

To build you image:

docker build -t <image name> .

To run your image locally:

docker run -p 9000:8080 <image name>

In a separate terminal, you can then locally invoke the function using cURL:

curl -XPOST "http://localhost:9000/2015-03-31/functions/function/invocations" -d '{"payload":"hello world!"}'

To learn more on deploying the function to ECR, check out the AWS documentation on Creating a repository and Pushing an image

Tag summary

Content type

Image

Digest

sha256:2ea9f826a

Size

125 MB

Last updated

1 day ago

docker pull amazon/aws-lambda-nodejs:24.2026.02.06.22-x86_64

This week's pulls

Pulls:

81,877

Last week