MultiCloud Classroom notes 30/Jul/2025

AWS EC2 instance creation.

  • Factors involved:
    • Instance type
    • AMI
    • Network (VPC)
      • subnet (AZ)
      • public ip (optional)
    • Storage:
      • Disk (EBS Volume)
    • Permissions for ec2 (IAM Role)
    • Cloud-init or UserData
  • The Root EBS Volume (volume with os) will be from a different physical server to the physical server chosen to create a ec2 instance.
  • Cloud-init or UserData is a script or configuration which is execute only once during creation.
  • Billing by state

lets create an ec2 instance with a user data to install apache server

  • Launch ec2
    • select ami
    • select instance type (free tier eligible t2.micro/t3.micro)
    • select network
      • az
      • security group
    • Expand Advanced Details
      • Userdata


  • UserData is executed only once during creation.
  • The disk is attached to EC2 instance
  • For this ec2 which we have created on-demand we are paying for
    • ec2 instance (hourly billing)
    • ebs volume
    • public ip address (dynamic)
  • In on-demand when we stop the instance
    • ec2 instance billing stops
    • public ip address billing stops
    • ebs volume billing continues.
  • Troubleshooting scenario:
    • If my userdata is wrong aws will not alert, to check the status of execution login into ec2 and look for /var/log/cloud-init.log and /var/log/cloud-init-output.log

Resizing the ec2 instances

  • AWS allows to resize instances only is ec2 is in stopped state.
  • in the below image the ec2 instance is in running state
  • Resize (Vertical scaling)

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%