Ravindra Bagale · AWSसर्व coursesया course चे lessonsशोधाEnglish

AWS · मराठी आवृत्ती

AWS Cloud

5.2 EC2 आणि त्याचे मुख्य concepts

या page मध्ये

EC2 म्हणजे AWS cloud मधले आकार बदलता येणारे virtual servers — instances. Furnished flat भाड्याने घेण्यासारखं समजा: size म्हणजे instance type, आतला setup म्हणजे AMI, key म्हणजे login key pair आणि gate rules म्हणजे SG. अनेक modern types Nitro वापरतात; सर्व types/tenancy एकसारखे नसतात.

 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अर्थउदाहरण
InstanceVirtual serveri-0abc123def4567890
AMIOS/software/config चं launch templateAL2023, Ubuntu 24.04, CentOS Stream 9 किंवा custom AMI
Instance typevCPU, RAM, network आकारt3.micro: 2 vCPU/1 GiB; t3.medium: 2 vCPU/4 GiB
Key pairSSH साठी public/private keyAWS public key ठेवते; mykey.pem तुम्ही सुरक्षित जपता
Security GroupENI/instance-level stateful allow-rule firewall22 My IP; public web 80/443
EBSNetwork-attached block storageउदा. 8 GiB gp3 root; actual AMI minimum तपासा
Instance storeHost-attached temporary storageनिवडक types; stop/terminate वर data टिकत नाही
Elastic IPStatic public IPv4Stop/start नंतर स्थिर; remap शक्य
Regionभौगोलिक areaMumbai ap-south-1, N. Virginia us-east-1
AZRegion मधली isolated data-centre location/groupap-south-1a, ap-south-1b, ap-south-1c
VPC/subnetPrivate network; subnet एका AZ मध्येDefault VPC उदाहरण 172.31.0.0/16
User dataLaunch वेळी दिलेली scriptDefault first boot वर Nginx install
IAM role / instance profileLong-lived access keys न ठेवता AWS permissionsS3 invoice bucket वाचण्याची मर्यादित permission

Blinkit dark store lab: AL2023 AMI, t3.micro, blinkit-key.pem, 22 फक्त My IP आणि web साठी 80/443. Mumbai हा जवळचा region पर्याय. SG stateful असल्यामुळे allowed connection चा reply वेगळ्या outbound allow rule शिवाय परत येऊ शकतो.

Instance type नाव

      t  3  a  .  micro
      │  │  │     └── size: nano, micro, small, medium, large, xlarge, 2xlarge ...
      │  │  └──────── extra attribute: a = AMD, g = Graviton (ARM), i = Intel, d = local NVMe, n = network
      │  └─────────── generation (higher = newer, better price/performance)
      └────────────── family: t = burstable general purpose

उदा. t3a.micro: t family, 3 generation, a AMD attribute, micro size. नवीन generation नेहमी तुमच्या workload साठी सर्वोत्तम असेलच असं नाही; performance/price तपासा.

Familyप्रकारवापरउदाहरण
TBurstable general-purposeLabs, dev/test, छोटी sitest3.micro, t3.small, t4g.small
MBalanced general-purposeApps, छोटी databasesm7i.large, m7g.large
CCompute-optimisedBatch/gaming/high computec7i.xlarge
R/XMemory-optimisedमोठ्या databases/cachesr7i.large
I/DStorage-optimisedNoSQL/data warehousesi4i.large
P/G/Inf/TrnAccelerated computeML/videog5.xlarge

T family मध्ये baseline CPU आणि credits ची कल्पना आहे. कमी वापराच्या site/lab ला चालू शकते; sustained CPU आणि Unlimited charges तपासा. Graviton types — t4g/m7g — ARM आहेत; arm64 AMI आणि compatible dependencies/container images वापरा. प्रत्येक binary x86 आणि ARM दोन्हीवर चालेलच असं नाही.

Pricing models

Modelपद्धतउपयोग
On-DemandLong-term commitment नाही; eligible Linux usage per-second/minimum लागूLabs, अनिश्चित demand
Savings Plans1/3 वर्षांसाठी $/hour commitment; advertised up to 72%स्थिर दीर्घकालीन वापर
Reserved Instances1/3 वर्षांचा billing commitment; scope/flexibility प्रकारावरसतत वापर
SpotSpare capacity; advertised up to 90%; interruption शक्यFault-tolerant batch, CI, rendering
Dedicated Hosts/InstancesPhysical tenancy isolation; host-level controls वेगळेLicensing/compliance

Current दर आणि अटी AWS EC2 pricing वर तपासा. Discount हा maximum आहे, guaranteed saving नाही. Compute व्यतिरिक्त EBS — stopped असतानाही — snapshots, public IPv4/EIP आणि data transfer चा खर्च असू शकतो.

Free Tier तपासून वापरा

Account तयार झालेली date आणि plan महत्त्वाचे. 15 July 2025 पासून नवीन accounts साठी credit-based plan आले; आधीच्या legacy terms वेगळ्या आहेत. t3.micro किंवा 30 GiB नेहमी free असेल असं गृहीत धरू नका. AWS Free Tier आणि Billing मधले स्वतःचे benefits तपासा. AWS ची plan-change माहिती.

Lab आधी budget/e-mail alert, root MFA आणि रोजच्या वापरासाठी least-privilege identity ठेवा; शक्य असल्यास federation/IAM Identity Center वापरा. Budget alert हा hard spending cap नाही.

Practice

Region, AZ, AMI, type, key pair, SG आणि root volume size अशी launch checklist कारणांसह लिहा.

झटपट उजळणी cards

हा lesson दोन मिनिटांत revise करा. Cards phone वर save करा किंवा PNG download करा. प्रत्येक card वरचा QR त्याचा lesson उघडतो.

तुलना card: On-Demand vs Savings Plans / Spot. On-Demand: Per second किंवा hour भरा, commitment नाही. Savings Plans / Spot: Savings Plans: 1 किंवा 3 वर्षांचं commitment. Spot: AWS ची रिकामी capacity.
तुलना: On-Demand vs Savings Plans / Spot · PNG download करा

अजून cards: Ravi Sir's Cards.