fourcodes-org / proof-of-concepts

2 stars 1 forks source link

66. Create the internal-facing network load balancer? #124

Closed four-codes closed 11 months ago

fourtimes commented 11 months ago

Internal facing NLB

Create the instra using the below resource

- vpc
- 2 public subnet
- RT
- IGW
- 2 public EC2 
- NLB
- Target Group

when we launching the ec2 instance. we need to give the webserver command in the user-data. then only we can able to see the content in display.

#!/bin/bash
yum install httpd -y
systemctl enable httpd
echo '<h1 style="color:blue;">This is public instance</h1>' > /var/www/html/index.html
systemctl start httpd
  1. create the internet NLB using this url - https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-network-load-balancer.html

OUTPUT

Image

Image