AWS Classroom Series – 28/Nov/2020

Amazon Machine Images (AMI)

  • This porved the information required to launch an ec2 instance. We can launch multiple ec2 instances using the same AMI
  • Every AMI has a unique id. Two AMI which have exactly same images in different regions will have different ids.
  • Snapshot: EBS snapshot is copy of the EBS Volume
  • AMI:
    • Collection of one-more EBS snapshots, Block Device mapping which specfies the volumes attached when an instance is launched and Launch permissions
  • AWS MarketPlace:
    • Third party ami’s can be purchased for AWS MarketPlace images Preview
    • Market place amis might have software licening costs Preview
  • AWS Community AMI will not have Software licensing costs
  • Lets create an Centos 7 instance from AWS Community AMIs t2.micro Preview Preview
  • While deleting the EC2 instances for community amis/market place ami’s ensure you delete the ebs volumes
  • We can create custom AMIs in AWS which will have our applications pre-installed.
  • Scenario: Lets assume your organization is developing applications which require java 8 and tomcat 8. So lets create an AMI with java 8 & tomcat 8 pre installed.
    • Create an ec2 instance with any linux distribution (ubuntu 18)
    • Now login into ec2 instance and execute the following commands
    sudo apt update
    sudo apt install openjdk-8-jdk tomcat8 -y
    
    • Navigate to http://<public-ip>:8080/ and you should be able to see the tomcat’s welcome page Preview
    • Now lets create a reusable AMI with tomcat8 pre-installed Preview Preview Preview Preview
    • Select the ami created and launch an ec2 instance (t2.micro) Preview Preview
  • AWS AMI Virtualization Types
    • Linux AMIs use one of two virtualizations
      • Paravirtual (PV):
        • PV AMIs boot with a special boot loader called as PV-GRUB, starts the boot cycle and then chain loads the kernel specified in menu.lst file on your image.
      • Hardware Virtual Machine (HVM):
        • HVA AMIs are presented with a fully virtualized set of hardware and boot by execute Master Boot Record of the root block device of your image.
  • Exercise:

Leave a Reply

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

About learningthoughtsadmin