The following document contains instructions on how to deploy a highly available web application using AWS CloudFormation.
The application infrastructure consists of deploying the following stacks:
- Network. This includes VPC, two pairs of public and private subnets, Internet Gateway, NAT Gateways and Routing Tables for public and private subnets with associations.
- Bastion hosts (Optional). These are EC2 instances for troubleshooting of application web servers.
- Application services. In particular, Load Balancer, web servers and corresponding autoscaling, target and security groups.
To create the infrastructure stack run the following commands in the same order as below:
-
./create.sh networkstack Infra-Config.yml Infra-Params.json
-
./create.sh appserverstack App-Servers-Config.yml App-Ser ers-Params.son
To check whether the web application is running, follow the web application public URL, which could be found in output exports of application-servers cloud formation stack.
To update the already existing infrastructure stack run one (or all) the following commands:
-
./update.sh networkstack Infra-Config.yml Infra-Params.json
-
./update.sh appserverstack App-Servers-Config.yml App-Ser ers-Params.son
To delete the infrastructure stack run the following commands in the same order as below:
./delete.sh appserversstack
2../delete.sh networkstack
Note: you would have to type 'yes' to confirm the stack deletion in the command prompt.