0
0
AWScloud~30 mins

Multi-AZ deployment for high availability in AWS - Mini Project: Build & Apply

Choose your learning style9 modes available
Multi-AZ deployment for high availability
📋 What You'll Learn
💡 Why This Matters
🌍 Real World
Multi-AZ deployments are used to keep applications running even if one data center or Availability Zone has problems. This setup is common for websites and services that must stay online.
💼 Career
Cloud architects and DevOps engineers often design and implement Multi-AZ deployments to improve fault tolerance and availability of cloud applications.
Progress0 / 4 steps
1
Create the VPC and public subnets
Create a CloudFormation template that defines a VPC with CIDR block 10.0.0.0/16. Then create two public subnets named PublicSubnet1 and PublicSubnet2 with CIDR blocks 10.0.1.0/24 and 10.0.2.0/24 respectively. Assign AvailabilityZone properties as us-east-1a for PublicSubnet1 and us-east-1b for PublicSubnet2.
AWS
Need a hint?

Start by defining the VPC resource, then add two subnet resources with the specified CIDR blocks and availability zones.

2
Add Internet Gateway and route table
Add an Internet Gateway resource named InternetGateway and attach it to the VPC using VPCGatewayAttachment. Then create a route table named PublicRouteTable associated with the VPC. Add a route to 0.0.0.0/0 that points to the Internet Gateway. Finally, associate the route table with both PublicSubnet1 and PublicSubnet2 using SubnetRouteTableAssociation resources.
AWS
Need a hint?

Attach the Internet Gateway to the VPC, create a route table with a default route to the Internet Gateway, and associate it with both public subnets.

3
Create Launch Configuration for EC2 instances
Add a LaunchConfiguration resource named WebServerLaunchConfig. Use the latest Amazon Linux 2 AMI by referencing AWS::SSM::Parameter::Value with parameter name /aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2. Set the instance type to t3.micro and enable associate public IP address.
AWS
Need a hint?

Use a parameter to get the latest Amazon Linux 2 AMI ID from SSM Parameter Store. Set instance type and enable public IP association.

4
Create Auto Scaling Group with Multi-AZ deployment
Add an AutoScalingGroup resource named WebServerASG. Set the LaunchConfigurationName to WebServerLaunchConfig. Set MinSize, MaxSize, and DesiredCapacity all to 2. Set VPCZoneIdentifier to a list containing PublicSubnet1 and PublicSubnet2 to deploy instances across both Availability Zones.
AWS
Need a hint?

Use the two public subnets in VPCZoneIdentifier to spread instances across AZs. Set min, max, and desired capacity to 2.