Name: Ankan Maity
Dept: ECE
Roll: 18700321104
Sec: B
Batch: 2021-25
Documentation about Host own portfolio in
AWS EC2 instance
Hosting our own website in AWS.
1. Create an EC2 Instance:
● Log in to your AWS Console.
● Check the region.
● Go to EC2 Dashboard → Launch Instance.
● Give a name to your instance.(My case test-1).
● Choose an Amazon Machine Image (AMI):
○ Select Ubuntu (recommended) or Amazon Linux.
● Choose an Instance Type:
○ For a basic website, t2.micro (Free Tier) is enough.
● create a new key pair (download it as .pem/.ppm):
● In Network setting allow SSH, HTTP, HTTPS to access over internet:
● Add Storage:
○ Default 8GB is enough for a small website.
● Launch the instance and create a new key pair (download it as .pem/.ppm).
● Now the instance is created, come to the instance tab and select the instance and change the instance
state to start instance.
2. Connect the console:
Instance is started, now time to connect the console to access CLI(Command Line Interface).
Here are two ways to connect the console.
1. Using the console provided by AWS website.
● Select the instance, in above there is connect option, connect->EC2 instance connect and then
click connect.
● Now boom its connected:
2. Using system Console.
● Open your terminal (I am using Linux terminal)
● Run ` ssh -i “your .pem file path” “your instance username”@”your instance public
ip” `
Example: `ssh -i /home/ankan/Downloads/AWS/test-1.pem ec2-user@13.235.78.231 `
3. Install apache2 web server:
● Go to Root directory:
○ Run: sudo su
● Update System Packages:
○ Run: sudo yum update -y1
● Install Apache (httpd):
○ Run: sudo yum install -y httpd
● Start and Enable Apache:
○ Run: sudo systemctl start httpd.service
○ Run: sudo systemctl enable httpd.service
● Check the status Apache:
○ Run: sudo systemctl status httpd.service
● Test the Web Server:
○ Go to the “http://your -public-ip”
○ EX: http://13.235.78.231
4. Transfer local file to EC2:
● Install filezilla in desktop:
○ Run: sudo apt-get install filezilla
● Open filezilla and open Site Manager , then create new site, set:
○ Protocol: SFTP
○ Host: (your public Ip) Port: 22
○ Logon Type: Keyfile
○ User : ec2-user
○ Keyfile :(your .pem file path)
○ And then connect.
● Download a portfolio site from bootstrap made.
● In the local site: go the path where the file has and in the remote site go the path where you want to
transfer the file.
○ My case
■ Local site : /home/ankan/Downloads/EasyFolio/
■ Remote site: /var/www/html
● Select file in local site section and drag to the remote site
4. Edit Portfolio site:
● Edit the temple using Vs code.
● Edit the temple using Vs code.
5. Upload My portfolio:
● Upload using FileZilla