Closed four-codes closed 11 months ago
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
Internal facing NLB
Create the instra using the below resource
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.
OUTPUT