Aws Ruby Lambda Layer Save

A layer which includes common ruby gems

Project README

Ruby Lambda Layer

This Repo shows how to include ruby native gems

Attention

It is generally a bad practice using api directly in the aws lambda. As it will consume too much connections very quickly.

How to use

build files

$ ./build.sh

deploy to aws

$ sls deploy

Then see the docs and configure your lambda to use the layer you just published.

or

deploy manually via aws cli

$ cd layer
$ zip -r layer.zip ./lib ./ruby/ -x ./ruby/2.5.0/cache/\*
$ aws lambda publish-layer-version \
         --layer-name ruby-kubectl-pg \
         --region us-east-1 \
         --compatible-runtimes ruby2.5 \
         --zip-file fileb://layer.zip

Gems included

gem 'json'
gem 'rack'
gem 'rack-contrib'
gem 'rake'
gem 'pg'
gem 'sequel'
gem 'activerecord'
gem 'dotenv'
gem 'httparty'
gem 'sidekiq'
gem 'redis'

# aws
gem 'aws-sdk-firehose'
gem 'aws-sdk-lambda'
gem 'aws-sdk-s3'

Credit

dschep https://github.com/dschep/sqlite-lambda-layer/

Open Source Agenda is not affiliated with "Aws Ruby Lambda Layer" Project. README Source: BranLiang/aws-ruby-lambda-layer
Stars
35
Open Issues
7
Last Commit
1 year ago

Open Source Agenda Badge

Open Source Agenda Rating