AWS Lambda & Ruby
Tags: ruby, jets, aws, rails
Published: 2019-06-14 15:46:00

After just recently learning how to use the Rails framework, I looked into what it would take to deploy that application. Heroku is an inexpensive option for doing so, however I was interested to see if there were better alternatives for ruby/rails app development in general. There is obviously no end of information out there on the subject, considering how long Rails has been relevant. However, while researching deployment strategies, I came across some information on a relatively new Ruby framework that uses an AWS Lambda to deploy. 


#####Here is a snippet from the AWS lambda splash page
   ```AWS Lambda lets you run code without provisioning or managing servers. You pay only for the compute time you consume - there is no charge when your code is not running. With Lambda, you can run code for virtually any type of application or backend service - all with zero administration. Just upload your code and Lambda takes care of everything required to run and scale your code with high availability. You can set up your code to automatically trigger from other AWS services or call it directly from any web or mobile app.```

There is a lot of other great information on Lambdas on both the AWS Lambda page and on the Ruby on Jets website. Essentially, Jets functions as a framework similar to Rails, but now that AWS Lambda supports Ruby functions, it allows you to build serverless applications. There is a great follow along blog post on Medium for how to build and deploy a Jets app. 

{%medium https://hackernoon.com/serverless-ruby-on-aws-lambda-with-the-jets-framework-989147f9d07b %}

As a companion piece to this article I plan to write about a build of my own using Jets and what my thoughts are on its learnability. Much of it's format looks very similar to that of Ruby, however it does require that you have a some degree of understanding when it comes to Labmdas. The docs have been hugely beneficial in the research I have done thus far. I will also attach another Medium article on creating Lambda functions in Ruby. {% medium https://hackernoon.com/build-a-ruby-based-lambda-function-44f3d006fef6 %}

Essentially the combination of Ruby support for writing Lambdas and the Jets framework allows you to build an entire application in Ruby alone. While I understand that most would not opt for a front-end written in Ruby/.erb, it is technically an option that is available to you. Considering that I am someone with a somewhat comfortable understanding of Ruby and Rails, that is something that feels tangible.

#####Conclusion: 
Jets is a fairly new framework that allows developers to create 'serverless services' through the use of AWS lambda, which now supports Ruby. 

I plan to continue documenting my learning journey as I struggle through teaching myself how to write lambdas in Ruby to eventually building a full scale Jets application from the ground up.

#####References:
https://hackernoon.com/serverless-ruby-on-aws-lambda-with-the-jets-framework-989147f9d07b
https://hackernoon.com/build-a-ruby-based-lambda-function-44f3d006fef6
https://aws.amazon.com/lambda/
https://rubyonjets.com/docs/