AWS Classroom Series – 09/May/2021

AWS EC2 instances

  • Refer Here
  • Instance Families
    • T family: Cheap, moderate baseline performance with the ability to burst to higher performance for short periods of time
    • M family: General purpose with balance ratio of CPU and memory
    • C family: Compute optimized, high CPU performance
    • R family: Memory Optimized with more memory that CPU power
    • D family: Storage optimized, offering huge HDD capacity
    • I family: Storage Optimized, offering huge SSD capacity
    • X family: Extensive capacity with focus on memory up to 1952 GB memory and 128 virtual cores
    • F family: Accelerated computing based of FPGA (Field programmable gate arrays)
    • P,G and CG family: Accelerated computing based on GPUs (graphics processing units) Preview
  • In November 2017 AWS announced a new generation of virtualization called as Nitro.
  • Nitro combines KVM-based hypervisor with customized hardware (ASICs) aiming to provide a performance that is far better than bare metal machines
  • Refer Here for official page on AWS Nitro

Running a Workload in AWS EC2 instance

  • For this lab environment lets assume the workload which we need to run is spring-pet clinic
  • To run this application, we need java to be installed (java 11)
  • Then we need to download the application package Refer Here and run the application using java -jar spring-petclinic-2.4.2.jar
  • This application will be using 8080 port for communication
  • Approach 1:
    • Create a ec2 instance and execute all of the steps manually
    sudo apt update
    sudo apt install openjdk-11-jdk -y
    java -jar spring-petclinic-2.4.2.jar
  • Approach 2: Installing the application automatically during creation
    • Select ubuntu 18 and t2.micro and in the Configure Instance Details page Preview Preview
    • In the Advanced detail section execute the following shell script
    apt update
    apt install openjdk-11-jdk -y
    cd /home/ubuntu
    java -jar /home/ubuntu/spring-petclinic-2.4.2.jar &
  • In Approach 2 the application is installed while ec2 instance is created.
  • If we want to have multiple instances created with the same application, it would be good if we can launch some AMI and directly get this application.
  • So we need to understand how to create an AMI with custom applications in it. Preview


Leave a Reply

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

About learningthoughtsadmin