Sample project of ToDo List using Lambda AWS with Node.js, MongoDB, Express and Gateway API
The current support AWS Lambda Node.js Runtime is v6.10.1.
To manage different versions of Node.js use the Node Version Manager - nvm.
After installing npm, install version 6.10.3 of Node.js:
nvm install v6.10.3
To use v6.10.3 on the terminal the project will be run, run the following command:
nvm use v6.10.3
npm install
> touch .env
MONGODB_CONNECTION_STRING=
> node scripts/run.debug.js
Deploy on AWS with Serverless Framework
Serverless is a toolkit for deploying and operating serverless architectures.
> npm install -g serverless
> serverless config credentials --provider aws --key YOUR_KEY --secret YOUR_SECRET_KEY
> MONGODB_CONNECTION_STRING=YOUR_CONNECTION_STRING DEPLOYMENT_BUCKET=YOUR_DEPLOYMENT_BUCKET serverless deploy