Today I am excited to announce three major updates to Lamby, Custom Ink's open source tools for using Ruby on Rails with AWS Lambda via SAM.
- 🦎♻️ ActiveRecord with RDS Proxy using MySQL
- 🔙👷♂️ Event-Driven ActiveJob with SQS
- 📈📊 CloudWatch Logs, Metrics, & Observability
- Dockerized CDK stacks for creating your first RDS DB Instance & Proxy.
- A precompiled Mysql2 gem with statically linked
libmysqlclientfor Amazon Linux 1 & 2.
- Using SSM Parameter Store for secure
- Integrated MySQL local development using Docker Compose.
- Uses the Shoryuken gem to send ActiveJobs to SQS queues.
- Creates all resources & policies in CloudFormation/SAM.
- Leverages SAM's Makefile builds to copy Rails applications to a standalone Lambda responding to SQS events.
- Guides on concurrency, FIFO queues, using Lambda's EventInvokeConfig and Destinations features for success/error handling.
- Project uses lograge gem's JSON formatter. Easily parsed by CloudWatch Logs Insights.
- New Ruby gem for CloudWatch Embedded Metrics.
- Introduction to using both in CloudWatch Dashboards.
- Dockerized SAM Cookiecutter getting started project. From development to 1st deploy in 5 minutes.
- Base project is Rails v6 with on Ruby 2.7 with Node 12 and Webpacker.
- Starts on API Gateway HTTP API but can be used with REST API or Application Load Balancers.
- Guides include how to setup Custom Domain Names.
- Usage of SSM Parameter Store for
RAILS_MASTER_KEYwith an integrated bootstrap process for multiple engineers to edit encrypted credentials.
- Rails setup to serve static CSS/JS assets but easily configured to use S3 asset hosts with CloudFront.
- Database options & guides include DynamoDB with
Aws::Recordand or Aurora Serverless with the new
activerecord-aurora-serverless-adaptergem for MySQL.
Posted on by: