Example how to create a api connected to mysql, using serverless and promise-mysql
Setup your aws credentials: How to create AWS credentials
Add your host, user, password and database name in .env file
$ npm install
$ serverless config credentials --provider aws --key KEYEXAMPLE10101010 --secret wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
$ serverless deploy
You can test your endpoint using Postman Here