Serverless service which provides a basic CRUD service using S3.
- 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
Make sure to create the path ./data/form-response
for the local server to work.
Simply perform requests against the exposed endpoints:
curl -X POST https://XXXX.execute-api.region.amazonaws.com/dev/form-response --data '{ "body" : "Learn Serverless" }'
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id>
curl https://XXXX.execute-api.region.amazonaws.com/dev/form-response/readAll
curl -X PUT https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id> --data '{ "body" : "Understand Serverless" }'
curl -X DELETE https://XXXX.execute-api.region.amazonaws.com/dev/form-response/<id>
- Lambda
- API Gateway
- S3