AWS Classroomnotes 02/May/2022

Creating an AMI

  • Create a ubuntu linux server
  • Execute the following commands
sudo apt update
sudo apt install apache2 -y
sudo apt install php libapache2-mod-php php-mysql -y
echo '<?php phpinfo(); ?>' | sudo tee /var/www/html/info.php
sudo systemctl restart apache2
  • Now navigate to http://<publicip&gt;
    Preview
  • Now navigate to http://<publicip>/info.php
    Preview
  • We would like to increase or decrease number of ec2 instances based on metrics
    Preview
  • For this exercise, lets assume that the metric will be cpu utilization.
  • Now for our lab purposes, we will be installing a tool which increases the load on cpu which is called as stress
    Preview
  • Now lets create an AMI
    Preview
    Preview
    Preview
    Preview
    Preview
  • Now lets create an ec2 instane with the AMI lamp
    Preview
    Preview
    Preview
  • Now if we want this image to be availble in other regions as well
    Preview
    Preview
    Preview
    Preview
  • AMI is backup of your EBS volume i.e. Snapshot + additional information (metadata)
    Preview
  • Pricing of AMI = Pricing of EBS Snapshots
    Preview
    Preview
    Preview
  • To remove the AMI, Use De-register AMI
    Preview
    Preview
  • Exercise: Create an AMI for Jenkins which is installed.

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner