knex-serverless-mysql

JSON →
library 1.1.0 ·javascript
verified Jun 5, 2026

Knex.js dialect adapter for serverless-mysql, enabling persistent database connections across AWS Lambda execution contexts. Version 1.1.0 is the latest stable release, with no frequent updates since 2021. It works as a custom Knex client dialect, wrapping the serverless-mysql connection pool, which maintains MySQL connections across cold starts. Unlike native Knex MySQL drivers, this reduces database load in serverless environments by reusing connections. Minimal overhead, but requires manual setup of the serverless-mysql instance and injection as the dialect along with the mysql option.