To use AWS Lambda (Serverless) with RDS in production, you should
- warm up functions
- preserve DRS connections
configure_handlers.js
configures Serverless handler functions to achieve them.
const configure_handlers = require('./configure_handlers');
function create_user(event, context, handler_callback) {
// Write you function
}
function list_users(event, context, handler_callback) {
// Write you function
}
module.exports = configure_handlers({
create_user,
list_users,
});