Select Amazon Linux AMI 2018.03.0 (HVM), SSD Volume Type
Add rule of HTTP and HTTPS
Create new RDS database. Fill up the form and save.
After that navigate to Security Groups under Network & Security on the EC2 dashboard and click the Create Security Group button.
Create security group with a MYSQL/Aurora rule that opens port 3306 access. Select Anywhere as source, then click Create.
ssh -i <filename.pem> ec2-user@<public_ip>sudo su
yum update -y
yum install httpd24 -y
yum install php72 php72-mysqlnd php72-imap php72-pecl-memcache php72-pecl-apcu php72-gd php72-mbstring -y
yum install mod24_ssl -y
service httpd startCheck by visiting to your public ip in the browser
chkconfig —add httpd
chkconfig httpd onyum install git -yComposer
yum install wget -y
wget https://getcomposer.org/composer.pharVerify Composer
php composer.pharInstall Laravel (Optional)
php composer.phar global require laravel/installerIf has error PHP Composer update “cannot allocate memory” error
/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
/sbin/mkswap /var/swap.1
/sbin/swapon /var/swap.1cd /var/www/htmlClone
git clone <git_url>Edit .htaccess
vim /var/www/html/laravel/public/.htaccessAdd RewriteBase / just below RewriteEngine On
Configure .env. Supply the database host, name, username and password base on the created rds database
mv .env.example .env
vim .envEdit config /etc/httpd/conf/httpd.conf and add the following at the bottom of the file
Alias / /var/www/html/<project_folder_name>/public/
<Directory "/var/www/html/<project_folder_name>/public">
AllowOverride All
Order allow,deny
allow from all
</Directory>
Give write access to storage folder
sudo chmod -R 777 /var/www/html/laravel/storage
sudo chmod -R 777 /var/www/html/laravel/storage/logsRestart Apache
service httpd restart
cd /var/www/html/laravelMigrate
php artisan migrate
Thank you for your reply.