Deploy Ruby Lambda functions with container images - AWS Lambda

Deploy Ruby Lambda functions with container images

You can deploy your Lambda function code as a container image. AWS provides the following resources to help you build a container image for your Ruby function:

  • AWS base images for Lambda

    These base images are preloaded with a language runtime and other components that are required to run the image on Lambda. AWS provides a Dockerfile for each of the base images to help with building your container image.

  • Open-source runtime interface clients

    If you use a community or private enterprise base image, add a runtime interface client to the base image to make it compatible with Lambda.

AWS base images for Ruby

AWS provides the following base images for Ruby:

Tags Runtime Operating system Dockerfile

2, 2.7

Ruby 2.7 Amazon Linux 2 Dockerfile for Ruby 2.7 on GitHub


Ruby 2.5 Amazon Linux 2018.03 Dockerfile for Ruby 2.5 on GitHub

Docker Hub repository: amazon/aws-lambda-ruby

Amazon ECR repository:

Ruby runtime interface clients

Install the runtime interface client for Ruby using the package manager:

gem install aws_lambda_ric

For package details, see Lambda RIC on

You can also download the Ruby runtime interface client from GitHub.