Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Steps to deploy website on AWS

Watch AWS شرح step by step on YouTube

Step 1:

Create AWS account & Sign In:

https://aws.amazon.com/

Step 2:

Create S3 bucket 

Step 3:

Create Key Pair 

Download the .pem file

Step 4:

Create EC2 Instence 

Step 5:

Install SSH locally

$ sudo apt install ssh

Step 6:

Check the SSH config file

$ sudo vim /etc/ssh/ssh_config

Make sure to have the following lines uncommented in /etc/ssh/ssh_config.d file:

PasswordAuthentication yes 

ChallengeResponseAuthentication no

PubkeyAuthentication yes

GSSAPIAuthentication yes

Step 7:

If you edit in ssh_config file then run the following command:

$ systemctl restart ssh

Step 8:

Connect to EC2 Insctence:

# Make sure you are in the directory where you've downloaded the .pem file 

$ ssh -i file.pem ec2-user@<Public IPv4 address>

Step 9:

Switch to root > install updates > install apache:

$ sudo su 
$ yum update -y
$ yum install httpd -y
$ service httpd start

Step 10:

Navigate to the following directory:

$ cd var/www/html

Step 11:

Download the .zip file using the S3 bucket URL:

$ wget <S3 bucket URL> # Make sure the S3 bucket is set to public to be able to download it on the EC2

Step 12:

Unzip the file:

$ unzip <file.zip>

Step 13:

Move files of the project into the current directory:

$ mv directory/* .