Skip to content

How to install mysql2 for Ruby 2.5 lambda runtimes (Requires Docker)

Notifications You must be signed in to change notification settings

CaDs/ruby-lambda-mysql2-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Steps

Build docker image

docker build -t lambda-ruby2.5-mysqldep .

Docker Run

docker run --rm -it -v $PWD:/var/task -w /var/task lambda-ruby2.5-mysqldep

Execute the following commands

cp -r /usr/lib64/mysql /usr/mysql
mkdir -p /var/task/lib
cp -a /usr/mysql/*.so* /var/task/lib/
bundle install --path=. --deployment

Exit and create a lambda package

zip -r ruby_gems.zip ./ruby/ ./lib/

Go to your AWS Lambda Console, create a new Lambda function and upload your .zip file

About

How to install mysql2 for Ruby 2.5 lambda runtimes (Requires Docker)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published