Postman Hackathon Demo
An example API to demonstrate the API Network submission to the Postman API Hackathon.
Deployment
This API is deployed into 4 AWS regions with a latency routing policy:
- af-south-1
- ap-east-1
- eu-south-1
- me-south-1
Response
There is a single endpoint that returns the version of the lambda deployed and the region that is responding.
$ curl https://demo.api-network.info/v1
{
"version":"1.0.0",
"region":"eu-south-1"
}
Deployment
Enable AWS Regions
The four AWS regions selected are not be default enabled. You will need to enable them within your AWS account settings.
First Deploy
Before we can deploy our code, we first must bootstrap the regions with CDK. This can be done running the following command:
$ node bootstrap.js
Deploy APIs
All the apis can be deployed with the follwing commands:
$ npm install
$ npm run deploy