4. Amazon EC2: Launch and Connect to Your Linux Server
4.1 What Is EC2? Key Concepts
EC2 mhanje AWS kadun "bhadyane ghetlela computer". Tumhi size nivadta (instance type), aat konta OS pahije te nivadta (AMI), kulup-killi nivadta (key pair) aani gate che niyam tharavta (security group). Technically, EC2 tumchi virtual machine AWS chya data centre madhe Nitro hypervisor var chalavto.
AWS Region: Asia Pacific (Mumbai) ap-south-1
+---------------------------------------------------------------------+
| Availability Zone ap-south-1a Availability Zone ap-south-1b |
| +---------------------------+ +---------------------------+ |
| | VPC subnet | | VPC subnet | |
| | +---------------------+ | | +---------------------+ | |
| | | EC2 instance | | | | EC2 instance | | |
| | | AMI: Ubuntu 24.04 | | | | AMI: AL2023 | | |
| | | Type: t3.micro | | | | Type: t3.small | | |
| | | SG: web-sg | | | | SG: web-sg | | |
| | +----------+----------+ | | +----------+----------+ | |
| | | EBS vol | | | EBS vol | |
| +---------------------------+ +---------------------------+ |
+---------------------------------------------------------------------+
| Term | What it is | Example / notes |
|---|---|---|
| Instance | A virtual server | i-0abc123def4567890 |
| AMI (Amazon Machine Image) | Template with OS + software used to launch instances | Amazon Linux 2023, Ubuntu 24.04, CentOS Stream 9, your own custom AMI |
| Instance type | Hardware size: vCPU, RAM, network | t3.micro (2 vCPU, 1 GiB), t3.medium (2 vCPU, 4 GiB) |
| Key pair | Public/private key used for SSH login instead of a password | AWS keeps public key; you download mykey.pem once |
| Security group (SG) | Stateful virtual firewall at instance level | Allow TCP 22 from My IP, TCP 80/443 from 0.0.0.0/0 |
| EBS volume | Network-attached block storage (virtual hard disk) | Root volume 8 GiB gp3 |
| Instance store | Temporary disk physically attached to host | Data lost on stop/terminate (only on some types) |
| Elastic IP | Static public IPv4 address | Survives stop/start; re-mappable |
| Region | Geographic area with multiple data centres | ap-south-1 Mumbai, us-east-1 N. Virginia |
| Availability Zone (AZ) | One or more isolated data centres inside a region | ap-south-1a, ap-south-1b, ap-south-1c |
| VPC / subnet | Your private network / a slice of it in one AZ | Default VPC 172.31.0.0/16 |
| User data | Script that runs automatically at first boot | Install Nginx on launch |
| IAM role (instance profile) | Gives the instance AWS permissions without storing access keys | Allow instance to read from S3 |
Why this matters for security
AWS follows the shared responsibility model (सामायिक जबाबदारी मॉडेल): AWS secures the physical data centre, hardware and hypervisor; you secure the OS, patches, security groups, keys, applications and data. Almost every EC2 breach you read about is on the customer side – an open port, a leaked key or an unpatched service.
Ravindra Bagale's Tip
Navin AWS account ughadlyavar khup students laghech instance launch kartat. Aadhi don kaam kara: root user la MFA laava aani AWS Budgets madhe email alert set kara. Mag rojchya kaamasathi IAM user vapra. Security aani kharcha control aadhi, prayog nantar – lakshat theva.
Practice task
In your own words, write one line each for: instance, AMI, instance type, key pair, security group, EBS volume, region, AZ and IAM role.