Spin up a 2-tier infrastructure on AWS Cloud using this terraform script within few minutes.
Prerequisites:
1. Configure local machine:
- Install AWS CLI
- Open terminal(linux/mac)/command prompt(windows)
- Run
aws configure
- Provide the access key, secret key and region as requested
2. Setup 2-tier Infrastructure:
- Unzip downloaded terraform file
- Add terraform executable file to your environment variable (Optional)
- Download all the files leaving .gitignore and README.md files. Note: You must generate your own private & public key
- Open terminal(linux)/command prompt(windows)
- Run
terraform init
command - Run
terraform apply
command. Provide yes as input when asked and hit enter
3. Let's Test the Infrastructure:
- Go to EC2 dashboard and click on Load Balancer in the left pane and grab the dns name of your load balancer
- Paste the dns name in your browser's URL bar and hit enter
- You should now see a "Hello World" message