A CRUD Notes REST API built on the AWS Lambda service.
This simple application allows users to do the following;
- Login via auth0
- Create a note
- View all the notes belonging to the current user
- Update notes belonging to the current user
- Delete notes belonging to the current user
This is a cloud application that primarily relies on AWS for functionality and Auh0 for login. Below is a comprehensive list of services in use;
-
Navigate to your projects directory on terminal.
-
Clone this repository.
git clone [email protected]:lewisemm/serverless-notes-app.git
-
Navigate to the downloaded repository.
cd serverless-notes-app/
-
Install
serverless
package globally.npm install -g serverless
-
Install the application's dependencies
npm install package.json
-
Start the DynamoDb service in the background on your local machine
sls dynamodb start &
-
Start the application locally
sls offline
- Login to AWS
- Navigate to the Identity and Access Management (IAM) service
- Add an IAM user using the console option. i. select the programmatic access option. You will get an access key and secret id. Use these to configure serverless framework ii. for permissions, add administrator access.
This is obviously a security risk, but it will do for such a hobby application. APPS ON PRODUCTION WILL REQUIRE THE USE OF LEAST PRIVILEGE PERMISSIONS.
- Run the following command to configure serverless credentials.
aws configure
- Provide the access key and secret id from step (3) above. Leave the rest of the options as default unless otherwise desired.
- Run the following command to deploy.
sls deploy -v