AWS Classroom Series – 24/Apr/2021

Elastic Compute Cloud EC2

  • AWS EC2 provides scalable computing capacity in AWS.
  • EC2 is a virtual machine in AWS Cloud which are referred as instances
  • AWS EC2 allows to create
    • Windows Instances
    • Linux Instances
    • MAC Instances
  • To Create an EC2 instance we need
    • a preconfigure template for instance known as Amazon Machine Image that includes Operating Systema & additional Softwares
    • Configuration of CPU, Memory and networking capacity known as instance type
    • A firewall that enables us to specify the ports, protocols and source IP ranges that can reach your instance
    • A virtual private cloud (VPC)
    • A public ip address
    • A key pair to login into ec2 instance
  • Lets create a key pair. Key pair is combination of private key and public key.
    • The key pair can be created in AWS Console and AWS will store the publick key and gives us the private key as pem file Preview Preview Preview Preview
    • We can import the existing key pair
      • Lets create a local key pair Preview
      • Now import the public key to aws Preview Preview
  • Now lets create a security group which opens 22 port for communication Preview Preview Preview
  • Now lets create a redhat 8 ec2 instance Preview Preview Preview Preview Preview
  • When we create an ec2 instance the following will be the other components created/used Preview
  • Exercise: Create an ubuntu 20 os with the key pair which is imported
    • To Create a key pair
    ssh-keygen -t rsa -C "mykeypair" -f "./mykeypair"
    • Create a security group with only ssh port opened
    • Select the instance type => t2.micro

Leave a Reply

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

About learningthoughtsadmin