All Projects → kleaver → Rumbda

kleaver / Rumbda

Licence: mit
Run ruby scripts on aws lambda.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rumbda

Lambda Monitoring
Logging and metrics libraries for AWS Lambda
Stars: ✭ 85 (-22.02%)
Mutual labels:  aws, aws-lambda
Kinesis Streams Fan Out Kinesis Analytics
Amazon Kinesis Streams fan-out via Kinesis Analytics (powered by the Serverless Framework)
Stars: ✭ 95 (-12.84%)
Mutual labels:  aws, aws-lambda
Aws Serverless Airline Booking
Airline Booking is a sample web application that provides Flight Search, Flight Payment, Flight Booking and Loyalty points including end-to-end testing, GraphQL and CI/CD. This web application was the theme of Build on Serverless Season 2 on AWS Twitch running from April 24th until end of August in 2019.
Stars: ✭ 1,290 (+1083.49%)
Mutual labels:  aws, aws-lambda
Python Lambda
A toolkit for developing and deploying serverless Python code in AWS Lambda.
Stars: ✭ 1,247 (+1044.04%)
Mutual labels:  aws, aws-lambda
Serverless
⚡ Serverless Framework – Build web, mobile and IoT applications with serverless architectures using AWS Lambda, Azure Functions, Google CloudFunctions & more! –
Stars: ✭ 41,584 (+38050.46%)
Mutual labels:  aws, aws-lambda
Dynamodb Stream Elasticsearch
Missing blueprint for AWS Lambda. Reads stream from AWS DynamoDB and writes it to ElasticSearch.
Stars: ✭ 83 (-23.85%)
Mutual labels:  aws, aws-lambda
Content Lambda Boto3
Automating AWS with Lambda, Python, and Boto3
Stars: ✭ 91 (-16.51%)
Mutual labels:  aws, aws-lambda
Fastapi Aws Lambda Example
Example app to be deployed to AWS as an API Gateway / Lambda Stack
Stars: ✭ 76 (-30.28%)
Mutual labels:  aws, aws-lambda
Serverless Image Processor
AWS Lambda image processor
Stars: ✭ 106 (-2.75%)
Mutual labels:  aws, aws-lambda
Node Athena
a nodejs simple aws athena client
Stars: ✭ 97 (-11.01%)
Mutual labels:  aws, aws-lambda
Torchlambda
Lightweight tool to deploy PyTorch models to AWS Lambda
Stars: ✭ 83 (-23.85%)
Mutual labels:  aws, aws-lambda
Lambdauth
A sample authentication service implemented with a server-less architecture, using AWS Lambda to host and execute the code and Amazon DynamoDB as persistent storage. This provides a cost-efficient solution that is scalable and highly available and can be used with Amazon Cognito for Developer Authenticated Identities.
Stars: ✭ 1,365 (+1152.29%)
Mutual labels:  aws, aws-lambda
Tensorflow Lambda Layer
Lets you import Tensorflow + Keras from an AWS lambda
Stars: ✭ 79 (-27.52%)
Mutual labels:  aws, aws-lambda
Python Lambdarest
Flask like web framework for AWS Lambda
Stars: ✭ 84 (-22.94%)
Mutual labels:  aws, aws-lambda
Lambda Refarch Webapp
The Web Application reference architecture is a general-purpose, event-driven, web application back-end that uses AWS Lambda, Amazon API Gateway for its business logic. It also uses Amazon DynamoDB as its database and Amazon Cognito for user management. All static content is hosted using AWS Amplify Console.
Stars: ✭ 1,208 (+1008.26%)
Mutual labels:  aws, aws-lambda
Lambcycle
🐑🛵 A declarative lambda middleware with life cycle hooks 🐑🛵
Stars: ✭ 88 (-19.27%)
Mutual labels:  aws, aws-lambda
Serverless Node Simple Messaging
Simple email AWS lambda function
Stars: ✭ 75 (-31.19%)
Mutual labels:  aws, aws-lambda
Serverless Plugin Git Variables
⚡️ Expose git variables to serverless
Stars: ✭ 75 (-31.19%)
Mutual labels:  aws, aws-lambda
Lambroll
lambroll is a minimal deployment tool for AWS Lambda.
Stars: ✭ 97 (-11.01%)
Mutual labels:  aws, aws-lambda
Serverless Chat
A serverless web chat built using AWS Lambda, AWS IoT (for WebSockets) and Amazon DynamoDB
Stars: ✭ 99 (-9.17%)
Mutual labels:  aws, aws-lambda

rumbda Build Status Gem Version

Run ruby scripts on aws lambda.

Installation

gem install rumbda

or add it to the Gemfile

group :development do
  gem 'rumbda'
end

What does rumbda do?

Rumbda does everything necessary to build a zip file for running ruby inside of an AWS Lambda. This includes downloading traveling ruby, creating a bundle of the project's Gemfile dependencies, and creating a consumable .zip file for use with Lambda.

Getting Started

Run rumbda init in the directory you'd like to have your Lambda project. This will create the following files in the current directory: source/main.rb, Gemfile, .gitignore, and .ruby-version. source/main.rb is the entry point to the ruby script. The Gemfile and Gemfile.lock are where gems are specified.

Building the zip

rumbda build
# => creates a file "index.zip" which contains all files in "source/" and all gems specified in the "Gemfile"

Configuring the Lambda

  1. Set Runtime to Node.js 6.10.

    node_js_version.png
  2. Set Code entry type to Upload a .ZIP file.

    images/code_entry_type.png
  3. In the Function package upload index.zip (the zip created by rumbda build).

    select_index_zip.png
  4. Set Handler to index.handler.

    handler.png

Example

See the example folder for what a project using rumbda might look like.

pwd
#=> ~/rumbda/example
ruby --version
#=> 2.2.2
bundle install
#=> installs dependencies, creates Gemfile.lock
bundle exec rumbda build
#=> builds the index.zip file

After the index.zip file is built, follow the steps for Configuring the Lambda.

Environment Variables and Events

Lambda environment variables are available to main.rb via ENV['<variable name>']. See the example.

The Lambda Event is available to the script via ARGV[0]. See the example. If testing the script locally, simply pass in a json as the first argument to the script:

$ ruby main.rb "$(cat test_event.json)"

Return JSON for API Gateway

If needing to return JSON from your lambda (e.g. for use in AWS API Gateway) write to a file path provided in your lambda's environment at key 'RUMBDA_RESULT_JSON_FILENAME'.

File.open(ENV['RUMBDA_RESULT_JSON_FILENAME'], 'w') do |file|
  file.write(JSON.dump({ statusCode: 200, body: '' }))
end

The file contents should be valid JSON.

Command Reference

Command Purpose
rumbda init Initializes a directory as rumbda project.
rumbda build Packages everything in ./source/ directory as well as gems specified in the Gemfile into a zip file called index.zip
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].