hands-on lab

Deploy a Highly Available Website with Terraform on AWS

Difficulty: Intermediate
Duration: Up to 1 hour and 30 minutes
Students: 5,754
Rating: 4.6/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

An attractive feature of the cloud is that you can deploy applications in multiple data centers making them highly available and able to tolerate a high degree of failures. In this Lab, you will deploy a secure and highly available website with Terraform on AWS using a two-tier architecture with private and public subnets. The web servers and Elastic Load Balancer will span multiple availability zones to achieve high availability.

Lab Objectives

Upon completion of this Lab you will be able to:

  • Apply infrastructure changes in Terraform
  • Configure all the network and security infrastructure needed to deploy a highly available website
  • Use user data to bootstrap web servers
  • Destroy infrastructure managed by Terraform

Lab Prerequisites

You should be familiar with:

Lab Environment

Before completing the Lab instructions, the environment will look as follows:

After completing the Lab instructions, the environment should look similar to:

 

Updates

Nov 8th, 2024 - Updated instructions and terraform version

April 20th, 2023 - Resolved an issue that caused the lab to fail to set up on rare occasions

November 22nd, 2022 - Updated lab to use EC2 Instance Connect and added checks

January 10th, 2019 - Added a validation Lab Step to check the work you perform in the Lab

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Connecting to the Virtual Machine using EC2 Instance Connect
Configuring the Website on the EC2 Instances with Terraform
Configuring Network Resources for Elastic Load Balancing with Terraform
Configuring an Elastic Load Balancer with Terraform
Destroying Resources with Terraform