Showing posts with label Instance. Show all posts
Showing posts with label Instance. Show all posts
Published April 30, 2018 by

How to Add New Volume to AWS Instance

Services>>EC2-Instances>>Volumes>>Create Volume


Create Volume

Volumes>>Create Volume
Please choose appropriate parameter according to your requirement. Please, note Availablity Zone must be same for your Instance Zone which with you attach volume.

Attach Volume

Select Volume>>Actions>>Attach Volume


Here it asks for confirmation. Click on Attach button.
Login to AWS instance and type lsblk to check if a drive is initialized on OS.

# lsblsk


Here it shows xvdf (20GB) is available for a mount.

You can also fdisk -l command for same.

Mount your volume using below command.

# mkfs.ext4 /dev/xvdf

Create a new directory and mount a new volume with each.

# mkdir /subhash
# mount /dev/xvdf /subhash

Now check disk fragmentation.

# df -h


Add an entry in /etc/fstab for mounting it automatically after reboot.

# vim /etc/fstab

Add this line at the end of a file.

/dev/xvdf /serverkaka ext4 defaults,nofail 0


Save and Reboot system.
Read More
Published April 24, 2018 by

Change AWS EC2 Instance Type

If we face hardware limitations of our EC2 instance, we can not just increase Memory/CPU cores as in VMWare, instead, we must change instance type. It is set of predefined images with different hardware specifications.

First, stop EC2 instance:

Seclect instance>>Actions>>Insatnce State>>Stop


Then, from Actions>>Instance Settings>>Change Instance Type


Select instance type from drop-down menu and click Apply

Now start the instance. and check changes.
Read More
Published January 04, 2018 by

Connecting to AWS VM (instance) from Linux Machine

In the last post, we connect to aws instance from windows machine now we will connect to it from Linux machine by Terminal

First of all, give permission 400 to pem key file

chmod 400 /home/ubuntu/serverkaka.pem

Open Terminal and Type

ssh -i /home/ubuntu/serverkaka.pem ubuntu@34.239.44.197

Here /home/ubuntu/serverkaka.pem is a path of my pem key file and 34.239.44.197 is my aws instance IP.




Now you connect with AWS instance

Read More
Published January 03, 2018 by

Connecting to AWS VM (instance) from Windows Machine

In the last post, we created Linux instance, and downloaded private key (serverkaka.pem) now we will connect to it from Windows by PuTTY

Download PuTTY from here

Run PuTTYgen to convert pem file to ppk, so we can import it into PuTTY



Click Load Button and Choose .pem file




Now PuTTYgen successfully imported pem file click OK and Save private key



If you want to set passphrase click No and set it, otherwise, click Yes


Then save keys with .ppk extension


Now note down or copy your VM's public IP


Open PuTTY and give IP and Port and expand SSH>Auth and Browse .ppk file and click Open Button.



Click Yes when it's asking for PuTTY Security Alert


Login as ubuntu because of we have Ubuntu server.


Now you successfully connected with your Linux AWS VM instance.


During instance creation, I created basic security rules in security group for SSH access only to VM’s IP to any address (0.0.0.0/0)

Read More
Published December 26, 2017 by

Create a VM (instance) in AWS

Log in to your AWS account and select which region, where you want to create your instance.



Select EC2 service under Services menu.



Click Launch Instance.



Choose OS image, which you want to use. (I select Ubuntu)



Select Instance type according to your requirement.


Configure Instance details like a number of instances, subnet, etc...


Choose HDD size and Type


Add tag... example: machine name, owner...


Configure Security Group, Security group working like Firewall in your VM. You can enable or disable Port or IP here using create inbound and outbound rules.


Review instance and Launch...


Create key pair and Download Key Pair and Launch instance...
Please keep safe place your Key.


View status of VM launching.


View Your Instance in EC2


Read More