These layers add the mysql, psql, mongodump, mongorestore client commands in the form of a layer to be used with AWS Lambda.
This is useful for Lambda functions that need to run MySQL, PostgreSQL or MongoDB commands to quickly import data to a RDS server, for example. It can be easier than using the MySQL API in the language of your choice. Particularly useful in coordination with a Bash lambda layer.
The layers (in the form of zip files) are built in Docker using the official AmazonLinux image, to match the typicial Lambda runtime environment.
- The MySQL layer is built from the official source (v8.0.32)
- The MariaDB layer is built from the binary files in the current
mariadbAmazonLinux package. - The PostgreSQL layer is built from the official source (v9.2.24)
- The MongoDB Tools layer is built from the official source (v100.4.0)
Pre-built zip archives that can be uploaded to your AWS account are available on the releases page.
If you have a working Docker setup, you just need to enter make to build both the MySQL and MariaDB layers. Alternatively:
make mysqlbuilds the MySQL variant from source.make mariadbbuilds the MariaDB variant from the pre-built packages.make postgresqlbuilds the PostgreSQL variant from source.make mongodbbuilds the MongoDB variant from source.
Note that the MySQL 8.0, PostgreSQL and MongoDB variants take considerably longer to build from source.