Saturday, August 3, 2019

AWS EC2 : Using Boot Straps

Using Boot Straps

This is use to automate things that you want to do during the initialize of your EC2 instance. Similar to bash scripts.

Steps

Services->EC2->Instances->Launch Instance->Select your AMI->Select your Instance Type->Advance Details

Type the following on the box

#!/bin/bash yum -y update yum -y install httpd service httpd start chkconfig httpd on cd /var/www/html echo "<html><h1>Nelson Webpage</h1></html>" > index.html

Add Storage->Add Tags->Set Security Group (Ensure port 80 is allowed in Inbound)->Launch Instance

To verify, get the ip address of your instance and type it in your browser. You should see the website "Nelson Webpage"

No comments:

Post a Comment