Building Static Ruby Gems for Lambda Zip or Containers using Docker & Amazon Linux

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • ruby-vips-lambda

    Discontinued AWS Lambda Layer for Ruby Libvips Gem

  • Prior to Lambda Containers we had to build a Lambda Layer using a myriad of techniques. The result was always something in the /opt directory, yet finding the right balance of what to put in that directory has always been a pain. For example, if your gem uses FFI (like ruby-vips) how do I build a layer, test it, and make sure that same layer is available for local development? Often times this required engineering some Docker & AWS SDK coordination. Not a simple process when means it could easily break or slow down testing upgrades to either the gem or supporting layer.

  • Nokogiri

    Nokogiri (鋸) makes it easy and painless to work with XML and HTML from Ruby.

  • The Ruby community is no stranger to this practice. Thanks to Ruby Heros like Luis Lavena, many of our popular gems have precompile Windows binaries. Today other projects like Nokogiri are now supporting precompiled gem packages for several platforms. This makes gem installs easier for both Lambda zip and containers by avoiding layers or container deployed system dependencies. It also makes our bundle installs much much faster. This time adds up for both development and our build pipelines.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • mysql2-lambda

    Discontinued Precompiled Mysql2 Gem for AWS Lambda

  • Here are some of the highlights from the mysql2-lambda project on how I built this gem for Lambda.

  • aws-sam-cli

    CLI tool to build, test, debug, and deploy Serverless applications using AWS SAM

  • Since this project is for Lambda, we used the base image provided by AWS SAM CLI.

  • patchelf

    A small utility to modify the dynamic linker and RPATH of ELF executables

  • There is a great tool called ldd which lists dynamic dependencies. In my case the mysql2 gem did not statically link all dependencies. This is why I had to use patchelf to fix a few.

  • serverless-application-model

    The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.

  • Welcome to my 3rd post in a long running series on Lambda & Containers. If you are a Rubyist new to Lambda and the Serverless Application Model (SAM), consider looking over this Ruby Microservice Workshop.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Superpower REST API DX with Serverless ⚡ and DevOps Best Practices on AWS (🐍 Python Version)

    5 projects | dev.to | 30 Apr 2024
  • Turbocharge your Lambda Functions with AWS Lambda Powertools for Python

    1 project | dev.to | 25 Apr 2024
  • Optimizing Costs in the Cloud: Embracing a FinOps Mindset

    1 project | dev.to | 2 Apr 2024
  • Billing for SaaS with EMF and CloudWatch Metric Streams

    1 project | dev.to | 8 Mar 2024
  • Serverless Site Health Check Notification System

    4 projects | dev.to | 22 Dec 2023