rails-on-lambda

rails-on-lambda is a skill for Claude Code from sorah/config. It costs 271 tokens per session (3,172 once invoked), scanned A, original, MIT.

A guide for running and moving a Ruby on Rails application to AWS Lambda, a cloud service that runs code in response to requests without a permanent server. It covers the web function, background jobs through SQS, and one-off commands such as database migrations.

In plain words
What is it for?
Use it when deploying, debugging, or moving a Rails app from ECS, App Runner, Heroku, or a virtual machine to Lambda.
Why use it?
It explains the limits of Lambda, such as temporary execution environments and read-only filesystems, so a Rails app is not designed like a traditional server.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md.

Part of the sorah-guides plugin — 23 skills, 3 commands, 1 agent shipped together

Good fit Use it when deploying, debugging, or moving a Rails app from ECS, App Runner, Heroku, or a virtual machine to Lambda.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sorah/config/rails-on-lambda
View source ↗ sorah/config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add sorah/config --skill rails-on-lambda
Clone the repo
git clone --depth 1 https://github.com/sorah/config

Made for: Claude Code.

Or install sorah-guides, the plugin that ships this one along with the rest of its 23 skills, 3 commands, 1 agent.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rails-on-lambda

README.md
[![agentmods](https://agentmods.dev/badge/skills/sorah/config/rails-on-lambda/github.svg)](https://agentmods.dev/skills/sorah/config/rails-on-lambda)
Your own site
<a href="https://agentmods.dev/skills/sorah/config/rails-on-lambda"><img src="https://agentmods.dev/badge/skills/sorah/config/rails-on-lambda/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for rails-on-lambda

Your own site · 80×15
<a href="https://agentmods.dev/skills/sorah/config/rails-on-lambda"><img src="https://agentmods.dev/badge/skills/sorah/config/rails-on-lambda.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 271 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00271 $0.03172
Opus 5.5 $0.00108 $0.01269
Sonnet 5.5 $0.00054 $0.00634
Haiku 4.5 $0.00027 $0.00317

Measured 1mo ago against content hash 0885e6b06907, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

rails-on-lambda scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

The scan reads SKILL.md. This mod also ships 10 executable files (references/config/boot.rb, references/config/docker_entrypoint.sh, references/config/initializers/active_job.rb, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

claude/marketplace/plugins/sorah-guides/skills/rails-on-lambda/SKILL.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Rails on AWS Lambda

How to run a Rails app on Lambda from one container image, with three functions: web (HTTP through a function URL behind CloudFront), lambdakiq (ActiveJob over SQS) and runner (one-off commands such as db:migrate). Taken from a production app that runs this way. Project-specific conventions (CLAUDE.md, docs/) always take priority.

  • Terraform follows /sorah-guides:terraform, the workflow /sorah-guides:github-ci.
  • Aurora DSQL fits Lambda well (IAM auth, no connection limit to manage); see /sorah-guides:dsql-on-rails.
  • Lambda Web Functions (HTTP servers on Lambda without an adapter) support Node.js only so far. Check /aws docs before choosing them for Ruby.

Lambda is not a server. Plan around these:

  • One request per execution environment. Concurrency means more environments, each with its own boot and its own database connections.
  • The environment is frozen as soon as the handler returns. Threads that work after the response (async reporters, buffered log shippers, Thread.new) stall until the next invocation, or never resume.
  • The filesystem is read-only except /tmp (512 MB by default).
  • A function URL buffers the request and response, each limited to 6 MB. No streaming, SSE, WebSocket or Action Cable through apigatewayv2_rack.
  • An invocation lasts at most 15 minutes. The web function is further limited by CloudFront's origin read timeout (60 s unless raised).
  • Cold starts boot Rails. Precompile bootsnap, eager load, and give the function enough memory, since CPU scales with it.
  • No in-process scheduler. ActiveJob delays are limited to SQS's 15 minutes.

Reference files

references/ mirrors an app's tree. Copy the files, then replace myapp, MyApp, the account ID and the region.

File What it is
Dockerfile One image for Lambda and Puma, with aws_lambda_ric, read-only bootsnap cache, tmp/ on /tmp
config/lambda_entrypoint.sh Lambda entrypoint: handler from APP_HANDLER, writable HOME, starts aws_lambda_ric
config/docker_entrypoint.sh Entrypoint everywhere else
config/boot.rb Loads lambda_boot.rb on Lambda only
config/lambda_boot.rb Copies SSM parameters into ENV before Rails boots
config/lambda_rack.rb Web handler, config.ru through apigatewayv2_rack
config.ru CloudFront verification and client IP middlewares
config/lambda_runner.rb Runner handler: runs a command, returns output and exit status
config/initializers/active_job.rb, lambdakiq.rb Queue adapter by JOB_ADAPTER, Lambdakiq worker on every job and mailer
config/initializers/sentry.rb Synchronous Sentry on Lambda
deploy/lambrunner.rb, deploy/Gemfile CLI that invokes the runner and exits with the command's status
tf/lambda.tf The three functions, function URL, SQS event source mapping
tf/sqs.tf, tf/locals.tf, tf/variables.tf Job queue and DLQ, environment and SSM_SECRET__ variables
tf/cloudfront.tf Distribution in front of the function URL, origin verify secret
tf/iam_MyApp.tf Execution role, and the deploy role's Lambda permissions
.github/workflows/deploy.yml Build and deploy jobs: image push, migrate, update functions

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 127 lines · 271 tokens per session scan A 0885e6b06907

Subscribe to this mod's changes

rails-on-lambda is a skill published in the GitHub repository sorah/config (31 stars, last pushed 11d ago), licensed MIT. It adds 271 tokens to every session and 3,172 once invoked, about $0.0011 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-21.

Related

rails-on-lambda compared with skills from other repositories

rails-on-lambda next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
rails-on-lambdasorah/configSkill3111d agoMITA271Claude Code
alchemy-providerpingdotgg/t3codeSkill86ktodayMITA153Claude Code, Codex
stripe-projectsNousResearch/hermes-agentSkill268ktodayMITA15Claude Code, Codex
django-storages-s3Jeffallan/claude-skillsSkill13kyesterdayMITA138Claude Code
websocket-engineerJeffallan/claude-skillsSkill13kyesterdayMITA36Claude Code
azure-eventhub-dotnetmicrosoft/skillsSkill3.3kyesterdayMITA94Claude Code
azure-mgmt-botservice-dotnetmicrosoft/skillsSkill3.3kyesterdayMITA78Claude Code