This will create a cloud formation stack with:
- API Gateway with 2 POST Endpoints
- Activate Card function
- Block Card function
- DynamoDB table named "cards"
- Ensure you have node.js and NPM installed
- Ensure you have AWS CLI installed and authenticated
- Install the serverless framework: -
npm install -g serverless - Uninstall the SAM or Terraform version from your AWS account if needed
npm install
cd serverless_framework
serverless deploy -v
serverless remove
POST:
{
"pan:": "1234123412341234",
"expiryDate": "12/20"
}
RESPONSE:
{
"id": "08996440-8d19-11e9-b5fc-070c28af1f8c",
"pan:": "1234",
"expiryDate": "12/20"
}
POST:
{
"id:": "08996440-8d19-11e9-b5fc-070c28af1f8c"
}
RESPONSE:
{} //200 ok