JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 292
  • Score
    100M100P100Q90580F
  • License MIT

Serverless Plugin to bundle gemfile as lamda layer

Package Exports

  • serverless-ruby-layer

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (serverless-ruby-layer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

iOS resume application project app icon

serverless npm Build Status Coverage Status MIT License

A Serverless Plugin to bundle ruby gems from Gemfile and deploy it to lambda layer automatically while running severless deploy.

It auto configures the lamda layer and RUBY_PATH to the all the functions.

Install

npm install serverless-ruby-bundler

Simple Usage

Include plugin in the serverless.yml

service: basic

plugins:
  - serverless-ruby-layer

provider:
  name: aws
  runtime: ruby2.5

functions:
  hello:
    handler: handler.hello

Gemfile

  source 'https://rubygems.org'
  gem 'httparty'

Running servleress deploy automatically deploys the required gems as in Gemfile to AWS lambda layer and make the gems available to the RUBY_PATH of the functions hello.handler

Customization

Using docker for gems with OS specific C extentions

Add custom config in serverless.yml

service: basic

plugins:
  - serverless-ruby-layer

custom:
  rubyLayer:
    use_docker: true

provider:
  name: aws
  runtime: ruby2.5

functions:
  hello:
    handler: handler.hello

Gemfile

  source 'https://rubygems.org'
  gem 'http'
  gem 'nokogiri'