---
title: "AWS Lambda loves Ruby again"
publication: "Ruby Weekly"
issue: 657
published_at: "2023-06-08"
canonical_url: "https://rubyweekly.com/issues/657"
---

Plus an alternative to strong parameters, a mature Kafka processing framework, IRB 1.7, and JRuby 9.4.3.0. |        

#​657 — June 8, 2023 

[Read on the Web](https://rubyweekly.com/issues/657)   

Together with [![AppSignal logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_700,h_120/e_make_transparent/co_white,e_outline:7/lme8p344dw1aodshz9px.png)](https://blog.appsignal.com/2023/04/26/how-to-monitor-custom-metrics-with-appsignal.html?utm_source=ruby-weekly-sponsored&utm_medium=email&utm_campaign=2023-04-26)   

Ruby Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/hjead68clsjoqvkkro37.jpg)](https://aws.amazon.com/blogs/compute/ruby-3-2-runtime-now-available-in-aws-lambda/)  

[Ruby 3.2 Runtime Now Available in AWS Lambda](https://aws.amazon.com/blogs/compute/ruby-3-2-runtime-now-available-in-aws-lambda/) — Ruby was one of the earliest languages to be supported on AWS’s serverless Lambda platform, but has been neglected recently with Ruby 2.7 remaining the latest version with first-class runtime support.. till today! Praveen handily rounds up the benefits of Ruby 3.2 vs 2.7 here (interesting even if you don't use Lambda), notes that cold starts are _marginally_ slower, and explains 2.7 support has been extended till December to enable a smooth transition. 

Praveen Koorse (AWS)   

[Setting up Rails 7 with React, TypeScript, and esbuild](https://ryanbigg.com/2023/06/rails-7-react-typescript-setup) — You could use [react-rails](https://github.com/reactjs/react-rails), but if you want to understand the various parts involved in making the magic happen with bringing React and Rails together, Ryan goes into detail here. 

Ryan Bigg   [![\](https://copm.s3.amazonaws.com/36ae3038.png)](https://blog.appsignal.com/2023/04/26/how-to-monitor-custom-metrics-with-appsignal.html?utm_source=ruby-weekly-sponsored&utm_medium=email&utm_campaign=2023-04-26) 

[How to Monitor Custom Metrics with AppSignal](https://blog.appsignal.com/2023/04/26/how-to-monitor-custom-metrics-with-appsignal.html?utm_source=ruby-weekly-sponsored&utm_medium=email&utm_campaign=2023-04-26) — Improve your application's critical monitoring data by tracking meaningful metrics to quickly identify and resolve potential issues. 

AppSignal sponsor    

- 🧑‍🍳 _Cookpad_ is a Japanese recipe sharing service that has, for many years now, employed Koichi Sasada and Yusuke Endoh of the Ruby core team to work on Ruby. Sadly, that has [🐦 now come to an end](https://twitter.com/_ko1/status/1665991721472397312) as part of broader staff reductions there.
- 🎤 DHH was on an episode of 37signals' _Rework_ podcast [▶️ talking about two person teams](https://37signals.com/podcast/two-person-teams/) and how 37signals builds its software, which naturally has Ruby and Rails at its heart.
- ✍️ One of our favorite technical bloggers, Julia Evans, often touches on Ruby related topics and has shared [some 'blogging myths'](https://jvns.ca/blog/2023/06/05/some-blogging-myths/) which might help you feel more confident working on your own posts.
- 😂 Bravo to David Kimura of the Drifting Ruby screencast site for dedicating his 404th episode to [▶️ approaches to displaying error pages in Rails apps.](https://www.driftingruby.com/episodes/page-not-found)
- ❓ [Rails recently merged a PR](https://github.com/rails/rails/pull/48293) updating Action View to use HTML5 (as opposed to HTML 4) standards-compliant sanitization. HTML5 support is available [in modern versions of Nokogiri](https://github.com/sparklemotion/nokogiri/releases/tag/v1.12.0) (for DOM parsing only) via `Nokogiri::HTML5` and the latest release of the Loofah sanitization library [supports it now too](https://github.com/flavorjones/loofah/releases/tag/v2.21.0) (in CRuby, but not JRuby).  

📕 Tutorials, Articles, and Videos 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/bit8tcraax9uaei02fdk.jpg)](https://www.hexdevs.com/posts/how-to-remove-dead-code-ruby/)  

[Four Strategies To Remove Dead Code from a Ruby App](https://www.hexdevs.com/posts/how-to-remove-dead-code-ruby/) — When code has long passed its use-by date, where does it go? Often it sits in your codebase going stale, but there are some strategies you can employ to clear it away with confidence. 

Stefanni Brasil and Thiago Araujo   

[Are You Sure Your `has_one` Association Really Has _One_ Association?](https://thoughtbot.com/blog/rails-has-one-limitations) — _“The Rails `has_one` API has an unexpected limitation: It does not prevent multiple records from being associated to the parent record.”_ Steve looks into the problem and how to mitigate it. 

Steve Polito   

[Upgrading from Selenium to Cuprite](https://janko.io/upgrading-from-selenium-to-cuprite/) — While a move to [Cuprite](https://github.com/rubycdp/cuprite) (the headless Chrome driver for Capybara) resulted in performance gains, it also introduced some flaky test failures that required a little detective work to fix. 

Janko Marohnić   

[📅 New Security Webinar on June 12th: Securing Your Rails Application](https://ombulabs.zoom.us/webinar/register/8016857349319/WN_8iJA29KBQjqfZEXqkKRnxA) — Learn how to stop bad actors and patch attack vectors from industry leaders [@mbuckbee](https://twitter.com/mbuckbee?lang=en) and[@etagwerker](https://twitter.com/etagwerker). 

FastRuby.io | Secure your Rails App sponsor   

[A ChatGPT Rails App Optimization Example](https://blog.widefix.com/optimize-performance-of-rails-app-with-chatgpt/) — It’s early days for using LLMs to help with dev tasks, but this is an interesting example of ChatGPT converting a bloated block of Ruby code into an SQL query that does the same thing. _(If you try this for yourself, you may want strong tests in place to verify the results..)_ 

Andrei Kaleshka   

[A Friday Email Incident at HEY](https://dev.37signals.com/a-friday-email-incident/) — Like all of us, the folks at 37signals run into technical incidents too. Here’s one that affected their HEY email service. Ruby is only vaguely involved, but it’s interesting to see how they patched over the problem temporarily. 

Jorge Manrubia (37signals)   

[Deploying a Sinatra App to Render.com](https://goodenough.us/blog/2023-06-05-til-deploying-a-sinatra-app-to-render-com/) 
Barry Hess   

[What to Do When You Need a `button_to` Within a Form in Rails](https://bhserna.com/what-to-do-when-you-need-a-button_to-within-a-form-in-rails.html) 
Benito Serna   

[Practical Stimulus: Capturing User Input](https://www.akshaykhot.com/practical-stimulus-capture-user-input/) 
Akshay Khot  

🛠 Code & Tools  

[Karafka 2.1: Multi-Threaded Kafka Processing Framework](https://mensfeld.pl/2023/06/karafka-framework-2-1-announcement/) — Apache Kafka is a distributed messaging system and Karafka opens it up to the Ruby world very well with ActiveJob backend support, a built-in Web UI, parallel processing supporting, dead letter queue functionality, and more. [GitHub repo.](https://github.com/karafka/karafka) 

Maciej Mensfeld   

[typed_params: An Alternative to Rails Strong Parameters](https://github.com/keygen-sh/typed_params) — A DSL for defining structured and strongly-typed controller parameter schemas for Rails APIs. (Extracted from a large, established app.) 

Keygen   

[Try `gem install trycourier` & Plug in Your Transactional Email API](https://github.com/trycourier/courier-ruby) — This gem helps you send notifications the easy way. Call one API with Courier.com the Customer Notification Platform. 

Courier.com sponsor   

[LangChain.rb: Build LLM-Backed Ruby Apps](https://github.com/andreibondarev/langchainrb) — Inspired by a popular, similarly named Python system, the goal is to provide a flexible abstraction on top of modern AI tools, databases and ML systems for building LLM workflows. 

Andrei Bondarev et al.   

[Spyke 7.1: Interact with REST Services in ActiveRecord Style](https://github.com/balvig/spyke) — Uses Faraday under the hood, but gives you some AR-like niceties on top like scopes, log output, validations, and even associations (the examples are helpful to understand that part). 

Jens Balvig   

[PluckInBatches: AR's `in_batches` Plus `pluck`](https://github.com/fatkodima/pluck_in_batches) — Combines the idea of dealing with records in batches _and_ only selecting certain columns (as [`pluck`](https://apidock.com/rails/v6.1.3.1/ActiveRecord/Calculations/pluck) allows) into a single call and claims to be faster, too. 

fatkodima    

Jobs  

[Full Stack Engineer, Ruby & React (’s-Hertogenbosch, Netherlands)](https://jobs.floryn.com/o/fullstack-software-engineer-shertogenbosch) — We help companies with fast & simple business loans. Own projects, work closely with stakeholders. No suits, just impactful code. 
Floryn   

[Find Ruby Jobs with Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-rubyweekly%29&utm_content=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired      

- [JRuby 9.4.3.0](https://www.jruby.org/2023/06/07/jruby-9-4-3-0.html) – Ruby 3.1-compatible branch of the JVM Ruby implementation.
- [Rufus Scheduler 3.9](https://github.com/jmettraux/rufus-scheduler) – In-process scheduler for Ruby supporting regular, once-off, and delayed method execution.
- [Excon 0.100](https://github.com/excon/excon) – Fast, simple HTTP/1.1 client with the highest minor version number of any gem?
- [RubyMine 2023.2 EAP3](https://blog.jetbrains.com/ruby/2023/06/rubymine-2023-2-eap3-updated-rbs-support-and-search-everywhere-functionality/) – with updated RBS support and 'search everywhere' functionality.
- [Async 2.6](https://github.com/socketry/async) – The asynchronous I/O framework.
- [Gruff Graphs 0.21](https://github.com/topfunky/gruff) – Long standing chart rendering library.
- [SidekiqExpiringJobs](https://github.com/fatkodima/sidekiq-expiring-jobs) – Expiring job support for Sidekiq.
- [Pay 6.6](https://github.com/pay-rails/pay) – Payments engine for Rails.
- [IRB 1.7.0](https://github.com/ruby/irb/releases/tag/v1.7.0)         

Curated by [Peter Cooper](https://twitter.com/cooperx86) and [Glenn Goodrich](https://twitter.com/ruprict).
Published by [Cooperpress](https://cooperpress.com/). 

[Change your email](https://rubyweekly.com/edit_subscription/*|UID|*) or [Stop getting this newsletter.](https://rubyweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom   

Other weekly newsletters we publish include [Postgres Weekly](https://postgresweekly.com/), [React Status](https://react.statuscode.com/), [Frontend Focus](https://frontendfoc.us/), and [JavaScript Weekly](https://javascriptweekly.com/).
