- Git link for code: Jsonuploader
- Hosted domain name: www.jsonuploader.com
- SSL enabled
This git repository contains the cloudformation templates for creating infrastructure for Jsonuploader web application. The infrastructure diagram is shown below.
- aws client installed (install doc)
- aws profile created (doc)
aws configure --profile <your_profile_name>
- The templates dir contains templates for cloudformation.
- It includes network, web and jumpbox templates.
- The parameters dir contains parameters required for spawning infrastructure in each region.
- The Makefile contains the commands to spawn infrastructure for each region.
- Entire infrastructure is divided into 3 templates. The examples provided below are for region us-west-1. Simillarly we can launch the application in other regions by changing parameters json.
- Network template network.json creates the following.
- 1 VPC
- 2 public subnets in 2 availability zones
- 2 private subnets in 2 availability zones
- 2 NAT gateways for private subnets each
- Internet gateway for VPC
- Public and private route tables
- The parameters can be provided in parameters/network-{region}.json
- Launch command
make network-us-west-1 "PROFILE=<your_profile_name>"
- Web template creates webservers to serve jsonuploader. It creates the following.
- auto scaling group of web servers for 2 subnets in 2 availability zones.
- Application load balancer
- IAM profile and IAM role
- Application security group
- Load balancer security group
- Load balancer listener
- Target group
- Launch command
make web-us-west-1 "PROFILE=<your_profile_name>"
- Jumpbox template creates jump boxes in each availability zone for debugging purposes. It creates the following.
- Instances in each public subnet
- Instance security group
- Launch command
make jumpbox-us-west-1 "PROFILE=<your_profile_name>"
- Certificate has t obe requested for domain jsonuploader.com and *.jsonuploader.com for new region.
- Once new LB is created in new region, the LB has to be added to the Route 53 hosted zones of
jsonuploader.com
- create a new recordset for the domain
jsonuploader.com
- select 'Type' - A record and 'Alias'
- Select the new LB from the dropdown menu
- add 'latency' to the routing policy.
- create a new recordset for the domain