🙈 This is an AWS SAM fork of the popular Serverless Notes API
🙉 The original Serverless Framework version is available here
🙊 The SAM-based backend may be better placed as an extra credit chapter, so there is currently no branching in place to support multiple chapters/steps. All of the latest AWS SAM specific resources are on the master.
Serverless Stack is a free comprehensive guide to creating full-stack serverless applications. We create a note taking app from scratch.
This repo is for the serverless backend API that we build over the course of the tutorial. You can find the repo for the frontend React app here. And the repo for the tutorial here.
To use this repo locally you need to have the AWS SAM installed.
The AWS SAM installation steps are available here
Clone this repo, install the NPM packages and build the source using webpack
$ git clone https://github.com/craigbarrau/sam-stack-demo-api
$ npm install
$ npm run-script build
We can run a single API request on local as follows:
$ sam local invoke List -e mocks/list-event.json
Where, mocks/list-event.json
contains the request event info and looks something like this.
{
"requestContext": {
"authorizer": {
"claims": {
"sub": "USER-SUB-1234"
}
}
}
}
Alternatively, we can start our API locally with the following
$ sam local start-api
$ open http://localhost:3000/notes
Finally, run this to deploy to your AWS account.
$ sam deploy --guided
This repo is maintained by Craig Barr. Additional information related to the tutorial is available here
The original repo is maintained by Anomaly Innovations; makers of Seed and Serverless Stack.