AWS Classroom Series – 05/Aug/2020

Physical Infrastructure and Virtual Machines in AWS

  • AWS AZ(Availability Zone) will have Datacenter’s and Datacenter’s will have racks.
  • Each rack will have physical servers (Which are custom built for AWS). Within each physical server there will be hypervisor used to create virtual machines which amazon calls as ec2 instances Preview
  • AWS popularly uses two hypervisors
    1. xen
    2. nitro
  • For every machine (physical/virtual) we will have some os in it. In virtual machines os is selected by something called as VM images. Amazon calls this as AMI (Amazon Machine Image)
  • Amazon allows you to choose different sizes of ec2 instances they call it as instance types. For free tier instance type t2.micro is free for 750 hours/month calculated as unit of hours.
  • AWS also gives different purchasing options as instance purchasing options
  • When creating an ec2 instance, we get to select
    • instance type
    • network
    • disk
    • user data (script to run when the machine is created)
    • security group
    • key pair.

Lets create a windows ec2 instance

  • Follow the screenshots Preview Preview Preview Preview Preview Preview Preview Preview Preview Preview
  • Amazon uses key based authentication, Amazon will have public key and you will be able download private key which you have to use for authentication. This private key can be generated only at the time of creation of key pair.
  • Windows machines cannot understand keypairs like linux/unix machines, so while loggin in aws will give an option to generate password from keypair. If you create linux machine you can use key pair directly. Preview Preview Preview Preview Preview Preview
  • Now lets login by opening the rdp file and entering the credentials Preview Preview
  • Now lets install webserver and access by using http://<publicip-ec2windowsinstance&gt; Preview

Lets create a linux ec2 instance

sudo apt-get update
sudo apt-get install apache2 -y

Preview

ec2 instance states

  • Running => AWS has allocated hardware & you will be paying for ec2 instance as long as machine is in running state
  • Stopped => AWS has deallocated hardware for your ec2 instance but not your storage. You will not be paying for ec2 instance but still billing will continue for disk
  • Terminated => Remove the ec2 instance
    Preview

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About learningthoughtsadmin