serverless-s3-crud
v0.1.0
Published
Serverless CRUD service using S3
Downloads
5
Readme
Serverless CRUD with S3
Serverless service which provides a basic CRUD service using S3.
Installation
- Run
serverless install --url https://github.com/tscanlin/serverless-s3-crud
to install the service in your current working directory - Next up cd into the service with
cd serverless-s3-crud
- Run
npm install
- Deploy with
serverless deploy
Development
Make sure to create the path ./data/form-response
for the local server to work.
How to use
Simply perform requests against the exposed endpoints:
Create
curl -X POST https://XXXX.execute-api.region.amazonaws.com/dev/form-response --data '{ "body" : "Learn Serverless" }'
List
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response
ReadOne
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id>
ReadAll
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response/readAll
Update
curl -X PUT https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id> --data '{ "body" : "Understand Serverless" }'
Delete
curl -X DELETE https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id>
AWS services used
- Lambda
- API Gateway