Lambda Containers with Rails; A Perfect Match!
Tags: docker, serverless, lambda, containers
Published: 2020-12-08 15:26:20

---
series: Serverless & Containers
---

A few weeks ago when I started this serverless & container series we talked about how to use Docker in your AWS Lambda projects with SAM. Who could have known that today I get to share in the recent [AWS Lambda Container Image Support](https://aws.amazon.com/blogs/aws/new-for-aws-lambda-container-image-support/) news by announcing that [Lamby](https://lamby.custominktech.com/) works out of the box with both ZIP and Container deployment packages! 🎉🎉🎉 

## How & Why?

From a Rails perspective with Lamby, nothing really changes. Lamby is a simple Rack adapter to mount your Rails application within any chosen Lambda integration point, most commonly, API Gateway. However, we did rewrite our [quick start guide](https://lamby.custominktech.com/docs/quick_start) to use containers by default. **Take it for a test drive to see your own Rails application on AWS Lambda!**

![Yay! You're on Rails with AWS Lambda Containers](https://dev-to-uploads.s3.amazonaws.com/i/qe3j2jz85u1rw6yp6ij2.png)

From a Lambda perspective, using containers is a "simple" deployment strategy option. All the same guarantees for the ZIP strategy apply. But this news also brought a huge buff for Lambda as well. 

* Memory: 128 MB to 10,240 MB, in 1-MB increments.
* vCPU: Up to 6 cores using memory setting.
* Container: 10 GB code package size.

Rather than duplicate work on the basics of Lambda functions as container images, I highly recommend these two posts:

* [Using container images with AWS Lambda](https://hichaelmart.medium.com/using-container-images-with-aws-lambda-7ffbd23697f1) - Michael Hart breaks things down to their smallest components using a simple Go PDF converter microservice.
* [Packaging AWS Lambda functions as container images](https://acloudguru.com/blog/engineering/packaging-aws-lambda-functions-as-container-images) - A guest post by [James Beswick](https://dev.to/jbesw) on A Cloud Guru. 

## Much More Coming!

So re:Invent [is not over](https://reinvent.awsevents.com/) and I'm sure AWS has a lot more cool things coming. From me, expect to see some very exciting new tools over the next few weeks. 

Up next, Lambdakiq! A 100% drop in replacement for [Sidekiq](https://sidekiq.org/) that leverages AWS managed services like SQS. Never again worry about side car containers, worker instances, process management for polling, or threading & concurrency. All these tools and worries evaporate when you integrate Rails with AWS! 😎 Stay tuned.

## Rough Edges 

First, I'd like to congratulate all the AWS teams that have been working their butts off to bring us these awesome features. I can only imagine the quality & technical scale those teams operate under. Much respect. ❤️ 

While working with AWS SAM for the Lamby quick start I did encounter a few issues. Some of which may be me. Documenting them here just in case.

* [Using ImageConfig in SAM can cause a SUPERNOVA](https://github.com/aws/aws-sam-cli/issues/2453)
* [Can SAM & Lambda teams both leverage ECR/Docker repositories?](https://github.com/aws/aws-sam-cli/issues/2254)
* [Can SAM's Makefile be used with Containers?](https://github.com/aws/aws-sam-cli/issues/2459)
* [Does SAM require an S3 Bucket for Containers?](https://github.com/aws/aws-sam-cli/issues/2450)
* [Can SAM's also create your ECR repository?](https://github.com/aws/aws-sam-cli/issues/2447)