DEV Community

Revathi Joshi for AWS Community Builders

Posted on

Use Amazon CloudFront for dynamic Websites - 2

Please read my previous article Use Amazon CloudFront for dynamic Websites -1

In this article, I am going to show you how to create a Target Group and an Application Load Balancer.

Let’s get started!

Please visit my GitHub Repository for S3 articles on various topics being updated on constant basis.

3. Create a Target Group my-TG.

1.

Image description

2.

Image description

3.

Image description

4.

Image description

5. Under Advanced health check settings

Image description

6. Next button.
7. Register Targets:

Image description

Image description

8. Click Create target group

Image description

4. Create an application Load Balancer.

1.

Image description

2.

Image description

3.

Image description

4.
  • VPC: Select Default VPC
  • Mappings: Select all zones

Image description

5. Remove the default security and Select the security group you created while launching an EC2 instance from the drop-down menu.

Image description

6. Select the target group my-TG from the drop-down menu.

Image description

7. Summary

Image description

8. Click Create Load Balancer

Image description

9. Copy the DNS name of the ELB under Description section and paste it in your browser.
http://my-lb-823658786.us-east-1.elb.amazonaws.com/
Enter fullscreen mode Exit fullscreen mode

Image description

10. refresh the page, and you can observe the ELB is equally splitting the traffic between the two instances. (Note the instance id and time changes each time you refresh the page.)

Image description

Top comments (0)