Giter Site home page Giter Site logo

madanbuddharaju / lambda_ruby Goto Github PK

View Code? Open in Web Editor NEW

This project forked from calasyr/lambda_ruby

0.0 0.0 0.0 7 KB

A Docker image that you build and run to package your Ruby code so it can run on a node.js Lambda fiction on AWS.

License: MIT License

JavaScript 41.68% Ruby 20.63% Dockerfile 37.69%

lambda_ruby's Introduction

Finally!

Ruby is now supported on Lambda, so there's no longer any need for this repo. Yeah!

https://aws.amazon.com/blogs/compute/announcing-ruby-support-for-aws-lambda/

lambda_ruby

Get your Ruby running on Lambda.

On 2016/12/09 the AWS Compute Blog described a technique for running unsupported languages on AWS Lambda.

https://aws.amazon.com/blogs/compute/scripting-languages-for-aws-lambda-running-php-ruby-and-go/

I gave it a try for Ruby and it worked for me. So I created a Docker image that automates most of the work.

Put your Ruby into your_ruby.rb, build the image and then run a new container to get the zip file for Lambda.

To build the supplied Docker image from the root directory of this repo.
$ docker build .

Then run this command, replacing <DOCKER_IMAGE> with the id of the image you just built. $ docker run -tiP -v ${PWD}:/result <DOCKER_IMAGE> cp /lambda_ruby/ruby.zip /result

This should copy ruby.zip to this same directory.

You can now upload this 7 megabyte file to a node.js AWS Lambda. This Lambda function will need a handler called 'ruby.handler'.

And you will need an execution role that can write to CloudWatch logs. A role with the AWSLambdaBasicExecutionRole managed policy, for example.

lambda_ruby's People

Contributors

calasyr avatar sfzxc avatar mhmenon910 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.