Skip to content
A Serverless Framework example using an AWS lambda which runs a Ruby function
Ruby Other
  1. Ruby 99.6%
  2. Other 0.4%
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.


Type Name Latest commit message Commit time
Failed to load latest commit information.

Serverless Ruby!

A Serverless Framework example using an AWS lambda which runs a Ruby function. Inspired by serverless-php.

This project demonstrates a few cool technlogies. Foremost is the amazing AWS Lambda. It's pretty exciting to see serverless architectures gaining adoption! Adding to the fun we have serverless, a framework for packaging and deploying across different providers including AWS, Google, and IBM. Also worth mentioning is the inclusion of Ruby. AWS Lambda supports a number of different languages natively, but Ruby is not one of them. Therefore we specially bundle the Ruby interpreter (courtesy of Traveling Ruby) and wrap it in a Node.js script which executes it as a binary.


  1. npm install -g serverless
  2. Create a new user serverless in AWS Console, download the credentials.csv file and setup provider:


serverless install --url

Deploy Function

$ serverless deploy
Serverless: Packaging service...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service .zip file to S3 (7.21 MB)...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
Serverless: Stack update finished...
Service Information
service: serverless-ruby
stage: dev
region: us-east-1
api keys:
  GET -
  hello: serverless-ruby-dev-hello

Try It Out!

    "status": 200,
    "body": "\"Hello from Ruby\""
START RequestId: e9f2de65-31bc-11e7-a576-c18c442d05f7 Version: $LATEST
END RequestId: e9f2de65-31bc-11e7-a576-c18c442d05f7
REPORT RequestId: e9f2de65-31bc-11e7-a576-c18c442d05f7	Duration: 126.52 ms	Billed Duration: 200 ms 	Memory Size: 1024 MB	Max Memory Used: 23 MB
You can’t perform that action at this time.