Rails on AWS Lambda with SAM

Lambda Loves Rails.

Move over basic "Hello World" functions - get ready to super charge your next Lambda project with the most productive web framework on the most convenient cloud infrastructure! Following up from my Arlington Ruby presentation AWS Lambda & Ruby/Rails with SAM last week - I am very excited to share today how you can get started with Rails under AWS Lambda.

Introducing Lamby

The Lamby Gem Simple Rails & AWS Lambda Integration using Rack

The goal of this project is to provide minimal code along with comprehensive documentation to get your Rails application running under AWS Lambda.

This gem's code will focus mainly on converting API Gateway event and context objects into a Rack env to send to your Rails application. Most everything else is documentation.

Get Started with Rails & Lambda Now!

Live Demo

Want to dig into a demo Rails application running on AWS Lambda? Visit https://lamby.metademo.net or checkout this GitHub repository customink/lamby_demo which is deployed to this custom domain name behind a CloudFront distribution.

def handler(event:, context:)
  Lamby.handler $app, event, context
end

Lots of Todos

This is just the start and the project list several TODOs that will happen over the coming weeks. So make sure to ⭐️ and 👁 watch the repository for updates to learn how to accomplish anything from Rails asset compilation using an S3 bucket, to tagged logging in CloudWatch, and more. Please submit an issue if you have any questions or want to see documentation around a certain topic of using AWS with Rails on Lambda. Thanks!


by Ken Collins