, 6 tweets, 2 min read Read on Twitter
I wrote a tool called img2lambda to take Docker images and convert them to AWS Lambda layers! 🥳
github.com/awslabs/aws-la…

Thread below on when img2lambda is useful 👇
If you like Docker for building stuff & want to use Lambda layers, img2lambda is for you!

Write a Dockerfile to compile a custom runtime & install libraries, then take advantage of all the goodness of Docker build caching to get fast builds

docker build -t my-custom-runtime .
If you base your Docker image on lambci (hello multi-stage builds!), you can test your runtime locally too!

Dockerfile:
FROM lambci/lambda:provided

docker run --rm -v "$PWD":/var/task my-custom-runtime
By building your Lambda layers with Docker, you can store them in Docker registries like Amazon ECR & Docker Hub until you're ready to publish to Lambda.

Plus, you can use container image security tools & vulnerability scanners like clair-scanner & Sysdig with your runtime image
When you're ready to publish the layers to Lambda, the img2lambda tool will inspect all the layers in the Docker image, find everything under /opt, and publish new layers to Lambda containing those files

img2lambda -i my-custom-runtime:latest -r us-east-1
Props to @michaelmoussa for his excellent PHP custom Lambda runtime blog post that started me down the path of building this thing!
aws.amazon.com/blogs/apn/aws-…
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Clare Liguori
Profile picture

Get real-time email alerts when new unrolls (>4 tweets) are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Follow Us on Twitter!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3.00/month or $30.00/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!