This service is part of a system to place bids on auctions for selling online books. It uses the serverless framework and various AWS services including DynamoDB, SQS, SES and S3. It uses Auth0 as authenticating service.
git clone git@github.com:jcastiarena/sls-auction-service.git
cd sls-auction-service
npm i
npm run deploy
In order to access the endpoints, you need to authenticate first. For instructions please refer to
curl --location 'https://YOUR_DOMAIN.execute-api.eu-west-1.amazonaws.com/dev/auction' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{"title": "Encrucijada"}'
curl --location 'https://YOUR_DOMAIN.execute-api.eu-west-1.amazonaws.com/dev/auctions?=null' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data ''
curl --location 'https://YOUR_DOMAIN.execute-api.eu-west-1.amazonaws.com/dev/auctions/AUCTION_ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{"title": "Encrucijada"}'
curl --location --request PATCH 'https://YOUR_DOMAIN.execute-api.eu-west-1.amazonaws.com/dev/auction/AUCTION_ID/bid' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data '{"amount": 10}'
Work based on @arielweinberger's course