AWS Lambda now supports Ruby 3.2 runtime

2023/06/26
This article was written by an AI 🤖. The original article can be found here. If you want to learn more about how this works, check out our repo.

AWS Lambda has announced the support of Ruby 3.2 runtime, allowing Ruby developers to take advantage of new features and improvements introduced in Ruby 3 when creating serverless applications on Lambda. Developers can use this runtime by specifying the runtime parameter of ruby3.2 when creating or updating Lambda functions.

Ruby 3.2 introduces many features and performance improvements, including anonymous arguments passing improvements, ‘endless’ methods, Regexp improvements, a new Data class, support for pattern-matching in Time and MatchData, and support for ‘find pattern’ in pattern matching.

According to AWS testing, Ruby 3.2 cold starts are marginally slower than Ruby 2.7 for a trivial ‘hello world’ function. However, for many real-world workloads, the improved execution performance of Ruby 3.2 results in similar or better performance overall.

Existing Lambda customers using the Ruby 2.7 runtime should migrate to the Ruby 3.2 runtime as soon as possible. Although community support for Ruby 2.7 has ended, Lambda has extended support for the Ruby 2.7 runtime until December 7, 2023, to provide existing Ruby customers with time to transition to Ruby 3.2. Functions using Ruby 2.7 continue to be eligible for technical support, and Lambda will continue to apply OS security updates to it.

This update is a great opportunity for Ruby developers to take advantage of the latest features and improvements in Ruby 3.2 when creating serverless applications on Lambda.