All Projects → customink → mysql2-lambda

customink / mysql2-lambda

Licence: MIT License
Precompiled Mysql2 Gem for AWS Lambda

Programming Languages

Dockerfile
14818 projects
shell
77523 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to mysql2-lambda

Lamby
Simple Rails & AWS Lambda Integration 🐑🛤
Stars: ✭ 336 (+1668.42%)
Mutual labels:  aws-lambda, ruby-on-rails
ruby-vips-lambda
AWS Lambda Layer for Ruby Libvips Gem
Stars: ✭ 34 (+78.95%)
Mutual labels:  aws-lambda, ruby-on-rails
Aws Appsync Rds Aurora Sample
An AWS AppSync Serverless resolver for the Amazon Aurora relational database.
Stars: ✭ 122 (+542.11%)
Mutual labels:  aws-lambda, rds
serverless-rack
Serverless plugin to deploy Ruby Rack applications (Sinatra/Rails/Padrino/Cuba etc.) and bundle gems
Stars: ✭ 58 (+205.26%)
Mutual labels:  aws-lambda, ruby-on-rails
super-serverless-sample
Backend serverless que simula o sistema de votação do BBB
Stars: ✭ 30 (+57.89%)
Mutual labels:  aws-lambda, rds
nestjs-graphql-serverless
Boilerplate for using NestJS with GraphQL (Code-First) on serverless environment (AWS Lambda)
Stars: ✭ 64 (+236.84%)
Mutual labels:  aws-lambda
cfn-api-gateway-custom-domain
API Gateway custom domains as CloudFormation resources, backed by Let's Encrypt
Stars: ✭ 17 (-10.53%)
Mutual labels:  aws-lambda
bref-symfony-demo
[DEPRECATED] Demo of a Symfony application deployed on AWS lambda using Bref
Stars: ✭ 32 (+68.42%)
Mutual labels:  aws-lambda
whats-your-name
Sample app for AWS Serverless Repository - uses Amazon Rekognition to recognize person on the photo
Stars: ✭ 17 (-10.53%)
Mutual labels:  aws-lambda
amazon-api-gateway-mutating-webhook-for-k8
AWS API Gateway as K8S mutating webhook to modify in K8S Pod automatically
Stars: ✭ 21 (+10.53%)
Mutual labels:  aws-lambda
eksphemeral
A simple Amazon EKS manager for ephemeral clusters
Stars: ✭ 68 (+257.89%)
Mutual labels:  aws-lambda
jschr.io
The static website generator service behind jschr.io.
Stars: ✭ 70 (+268.42%)
Mutual labels:  aws-lambda
LocalSupport
A directory of local support services and volunteer opportunities
Stars: ✭ 60 (+215.79%)
Mutual labels:  ruby-on-rails
nuxt-on-lambda
Nuxt.jsをAWS Lambdaで動かす
Stars: ✭ 78 (+310.53%)
Mutual labels:  aws-lambda
stimulus todomvc
[WIP] An implementation of TodoMVC using Ruby on Rails and StimulusJS
Stars: ✭ 14 (-26.32%)
Mutual labels:  ruby-on-rails
serverless-transformers-on-aws-lambda
Deploy transformers serverless on AWS Lambda
Stars: ✭ 100 (+426.32%)
Mutual labels:  aws-lambda
SWoT
A web application for designing, tracking, and reporting progress on workouts. Written in JavaScript with React, Redux, Material UI, and hosted by a serverless AWS backend.
Stars: ✭ 14 (-26.32%)
Mutual labels:  aws-lambda
Hodor
Hodor is a an automation application that is used to open the door controlled by an intercom system from Slack using a custom slash command.
Stars: ✭ 21 (+10.53%)
Mutual labels:  aws-lambda
lapa
Universal AWS Lambda packager
Stars: ✭ 20 (+5.26%)
Mutual labels:  aws-lambda
lambda-checklist
The checklist for meticulous serverless engineers
Stars: ✭ 26 (+36.84%)
Mutual labels:  aws-lambda

Test

Mysql2 Lambda Gem

Lamby: Simple Rails & AWS Lambda Integration using Rack.Very simple Mysql2 gem precompiled for Amazon Linux 1 & 2 (Ruby 2.5 & 2.7) with statically linked libmysqlclient ready for any AWS Lambda usage, including Rails. Add it to your Gemfile:

# When using Rails.
gem 'mysql2-lambda'

# When NOT using Rails.
gem 'mysql2-lambda', require: 'mysql2'

Part of a suite of open source projects from Lamby: Simple Rails & AWS Lambda Integration using Rack. Details include:

  • Tested on Ruby 2.5.x & 2.7.x
  • Small Size! Only 5 Megabytes. No Lambda Layers needed!
  • Works with any MySQL connection. Including RDS Proxy.

Methodology

We used the amazon/aws-sam-cli-build-image-ruby2.5 Docker image from the SAM CLI project to build the MySQL Connector/C's libmysqlclient. From there we ensure the Mysql2 gem statically includes that library. The resulting packaged gem and mysql2.so file looks something like this.

$ ldd mysql2.so
  linux-vdso.so.1 =>  (0x00007ffcb15d4000)
  libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007fa8ebd21000)
  librt.so.1 => /lib64/librt.so.1 (0x00007fa8ebb19000)
  libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa8eb8fd000)
  libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fa8eb687000)
  libdl.so.2 => /lib64/libdl.so.2 (0x00007fa8eb483000)
  libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa8eb24c000)
  libm.so.6 => /lib64/libm.so.6 (0x00007fa8eaf4a000)
  libc.so.6 => /lib64/libc.so.6 (0x00007fa8eab7c000)
  libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa8ea966000)
  /lib64/ld-linux-x86-64.so.2 (0x00007fa8ec72e000)
  libfreebl3.so => /lib64/libfreebl3.so (0x00007fa8ea764000)

Development

Clone or fork this repository, make sure you have Docker installed, then run the following commands.

./bin/setup
./bin/build

You will now have a packaged gem in the root of your project. Simple tests to make sure it works.

./bin/test 2.5
./bin/test 2.7

License

Thanks to all the contributors of the Mysql2 (https://github.com/brianmario/mysql2) gem. The license here is the same as that. MIT.

Code of Conduct

Everyone interacting in the Mysql2 Lambda project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

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].