/serverless-crud

Todo CRUD example based on serverless-crud

Primary LanguageJavaScript

Serverless CRUD

Serverless service which provides a basic CRUD scaffold.

Installation

Make sure that you use Serverless v1.

  1. Clone this repository
  2. Execute make setup
  3. Deploy with make deploy

How to use

Simply perform requests against the exposed endpoints:

Create

curl -X POST https://XXXX.execute-api.region.amazonaws.com/dev/todos --data '{ "body" : "Learn Serverless" }'

Read all

curl https://XXXX.execute-api.region.amazonaws.com/dev/todos

Read one

curl https://XXXX.execute-api.region.amazonaws.com/dev/todos/<id>

Update

curl -X PUT https://XXXX.execute-api.region.amazonaws.com/dev/todos/<id> --data '{ "body" : "Understand Serverless" }'

DELETE

curl -X DELETE https://XXXX.execute-api.region.amazonaws.com/dev/todos/<id>

AWS services used

  • Lambda
  • API Gateway
  • DynamoDB