Professional Documents
Culture Documents
Unit IV Cloud Computing
Unit IV Cloud Computing
By
Prof. Mahesh Bhandari
VIIT, Pune
Introduction
• Different IT service offered by Amazon as Web
Services, to the Public are known as “Cloud
Computing “
• By using Cloud Computing, it becomes
possible to invest low for heavy infrastructure,
• which in other cases requires lot more
investment and that too before time i.e. also
known as “on-demand low cost pay as you go
model”
Important Cloud Services provided by AWS
The smallest subnet that you can create is a /28 (16 IP addresses).
AWS reserves the first four IP addresses and the last IP
address of every subnet for internal networking
purposes.
For ex: a subnet defined as a /28 has 16 available IP addresses,
subtract the 5 IPs needed by AWS to yield 11 IP addresses for
your use within the subnet.
Continued.
Subnets can be classified as public, private, or VPN-only.
A public subnet is one in which the associated route table
directs the subnet’s traffic to the Amazon VPC’s IGW
A private subnet is one in which the associated route table does
not direct the subnet’s traffic to the Amazon VPC’s IGW.
A VPN-only subnet is one in which the associated route table
directs the subnet’s traffic to the Amazon VPC’s VPG. and does
not have a route to the IGW. Regardless of the type of subnet,
the internal IP address range of the subnet is always private
(that is, non- routable on the Internet).
Route Tables
A route table is a logical construct within an Amazon VPC that contains a
set of rules (called routes) that are applied to the subnet and used to
determine where network traffic is directed.
Each subnet must be associated with a route table, which controls the routing for the
subnet. If you don’t explicitly associate a subnet with a particular route table, the subnet
Can Replace the main route table with a custom table that you’ve created so that each
Each route in a table specifies a destination CIDR and a target; for ex: traffic destined
for 172.16.0.0/12 is targeted for the VPG. AWS uses the most specific route that
14. From the Instance dropdown list, choose the My_Instance instance.
The Device name field is set to /dev/sdf.
15. Choose Attach volume.
• The Volume state of your new volume is
now In-use.
Connecting to the EC2 instance
• We may have a doubt that we have attached the volume to
EC2 then why we need to perform the below steps by
connecting to the instance. The answer is:
– The OS needs to recognize the new attached volume.(command:
lsblk)
– We need to format the EBS volume with a file system (command
mkfs) so that it creates a file system structure on the volume and
gets ready to store files.
– Creating a mount point (command: /mnt/data).The mount point is
a directory where the file system of the attached volume will be
attached.
– Mounting the volume (command: mount), establishes a connection
between file system on EBS volume and specified mount point.
• Use EC2 Instance Connect to connect to the
EC2 instance.
– 16. On the AWS Management Console, Choose
EC2.
– 17. In the navigation pane, choose Instances.
– 18. From the list of instances, select
the My_Instance instance.
– 19. Choose Connect.
20. On the EC2 Instance Connect tab,
choose Connect.
Creating and configuring the file system
• In this, we add the new volume to a Linux instance as an ext3
file system under the /mnt/data-store mount point.
• 21. To view the storage that is available on your instance, in
the EC2 Instance Connect terminal, run the following
command:
– df -h
• You should see output similar to the following:
• These results show the original 8 GB disk
volume. The new volume is not yet shown.
– 22. To create an ext3 file system on the new
volume, run the following command:
• sudo mkfs -t ext3 /dev/sdf
• 22. To create an ext3 file system on the new
volume, run the following command:
– sudo mkfs -t ext3 /dev/sdf
• 23. To create a directory to mount the new
storage volume, run the following command:
– sudo mkdir /mnt/data-store
• 24. To mount the new volume, run the
following command:
– sudo mount /dev/sdf /mnt/data-store
– echo "/dev/sdf /mnt/data-store ext3
defaults,noatime 1 2" | sudo tee -a /etc/fstab
– The last line in this command ensures that the
volume is mounted even after the instance is
restarted.
• 25. To view the configuration file to see the
setting on the last line, run the following
command:
– cat /etc/fstab
• 26. To view the available storage again, run
the following command:
– df -h
• The output now contains an additional line
similar to the following: /dev/xvdf. Here it
shows /dev/nvme1n1
• 27. To create a file and add some text on the
mounted volume, run the following command:
– sudo sh -c "echo Sample text in a file >
/mnt/data-store/file.txt"
• 28. To verify that the text has been written to
your volume, run the following command:
– cat /mnt/data-store/file.txt
• The output displays the text that this
command copies to the file.