AWS Classroom Series – 07/Dec/2020

EC2 instance Status Checks

  • Lets create an ec2 instance and look at status checks Preview Preview
  • Types of Status Checks
    • System Status Checks:
      • They check AWS Systems (physical server) on which your ec2 instance runs
      • These check detect underlying probles with your instance that require AWS involvement to repair
      • The failure represents one of the following
        • Loss of network connectivity
        • Loss of System Power
        • Software issues on Physical Host
        • Hardware issues on Physical Host
    • Instance Status Checks:
      • They check software & network configuration of your ec2 instance.
      • This check is performed by send ARP (Address Resolution Protocol) packet to the Network interface.
      • This failure requires your involvement to repair
      • The failure represent
        • Failed System Checks
        • Incorrect network or start up configuration
        • No Memory
        • Corrupted file system
        • In compatible kernel
  • Troubleshooting can be done as shown below and select system log Preview Preview
  • Get Instance Screenshot Preview
  • Resizing Instance types can be done when your ec2 instance is stopped Preview

Scenario: Create a linux ec2 instance with apache server installed

  • In ubuntu machine to install apache server
sudo apt-get update
sudo apt-get install apache2 -y
  • One approach is create an ec2 instance and login into ec2 instance and execute the commands
  • AWS has one more approach which is called as user data
User data
  • While we launch ec2 instance user data is the way to pass the automated configuration task
  • Lets try to create an ubuntu instance with the following script as userdata
sudo apt-get update
sudo apt-get install apache2 -y

Preview Preview Preview Preview Preview

  • By default user data scripts run only during boot cycle when you first launch an instance
  • To get further into the details, we need to understand retrieving dynamic data and metadata versions
  • We also need to understand cloud-init
  • Exercise: Ensure you go through yaml tutorial before tomorrow’s session Refer Here


  • Create a Key pair from AWS CLI
aws ec2 create-key-pair --key-name 'forfun' --query 'KeyMaterial' --output text > forfun.pem
chmod 400 forfun.pem


  • Create an ec2 instance with this keypair and login into ec2 instance without using aws console
aws ec2 run-instance

Preview Preview *

Leave a Reply

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

About learningthoughtsadmin