Create a VPC 

Create a Internet Gateway 

Routing Internet Traffic in the public subnet to the internet gateway 

Create a security To connect to your EC2 instance and install the Apache web server with PHP 


yum update 

amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2 

yum install -y httpd 

systemctl enable httpd.service 

systemctl start httpd cd /var/www/html 

wget unzip