This is a short article on how to build Highly Available Web Applications in AWS.
Summary Steps
- Migrate an Auto Scaling Group behind an Application Load Balancer in one Availability Zone.
- Set up Load Balancer health monitoring for an Amazon EC2 Auto scaling group. Add a second Availability scaling group to the Amazon EC2 Auto Scaling Group.
- Configure an Auto scaling group to include a new EC2 instance in a third Availability zone.
** Step-by-step guide**
- Visit your AWS Console page
- In the top navigation bar search box, type: ec2
- In the search results, under Services, click EC2.
- In the left navigation pane, click Auto Scaling Groups.
- In the Auto Scaling groups section, choose the check box to select your WebServers.
- On the Details tab, review the current capacity details.
- Click the Instance management tab.
- Review to see that there is currently one instance in the Auto Scaling group.
- Click the Details tab.
- Scroll down to Network.
- In the Network section, review to see that the Auto Scaling group is configured with a single subnet from one Availability Zone.
- Scroll down to Load balancing.
- Click Edit.
- Click Add a new load balancer.
- For Load balancer type, choose Application Load Balancer.
- For Load balancer scheme, choose Internet-facing.
- For Availability Zones and subnets, choose the three check boxes to select all three Availability Zones.
- On each of the three dropdown menus, choose the available public subnet.
- For Default routing (forward to), choose Create a target group.
- Keep the defaults.
- To create the Application Load Balancer, click Update.
- In the left navigation pane, click Security Groups.
- In the Security Groups section, click Create security group. 22 . In the Basic details section, for the Security group name, type: **LoadBalancer **name
- For Description, type a description that you like, such as Allow access to the travel agency load balancer from the internet.
- For VPC, choose your VPC
_- To remove the existing VPC entry, you might need to click the X.
_
- In the Inbound rules section, click Add rule.
- Go to the next step.
- In the Inbound rules section, for Type, choose HTTP.
- To allow all inbound traffic, for Source, in the Custom search box, choose 0.0.0.0/0.
- In the Outbound rules section, for Type, choose HTTP.
- For Destination, choose the your security group.
- Remove the 0.0.0.0/0 destination.
- Scroll down to the bottom of the page.
- Click Create security group.
- In the left navigation pane, click Security Groups.
- In the Security Groups section, choose the check box to select the security group.
- On the Actions dropdown menu, choose Edit inbound rules.
- In the Inbound rules section, to remove the existing rule, click Delete.
- You must delete the existing rule to modify the rule type.
- To add a new rule, click Add rule.
- For Type, choose HTTP.
- For Source, choose your LoadBalancer security group.
Click Save rules.
In the left navigation pane, click Load Balancers.
In the Load balancers section, click your LoadBalancer.
Scroll down to the Security tab.
On the Security tab, click Edit.
For Security groups, click the X icon to deselect the WebServer security group.
Choose the LoadBalancer.
Click Save changes.
In the success alert, review the message.
For the Application Load Balancer, under DNS name, click the copy icon to copy the provided name.
In a new browser tab (or window) address bar, paste the DNS name that you just copied, and then add http:// to the beginning and press Enter.
_- The website is hosted only with HTTP.
_
- Congratulations! You have moved the travel agency website behind an Application Load Balancer.
Top comments (0)