2. EC2 - Elastic Compute Cloud

👋 Hello! I'm passionate about DevOps & AWS Cloud. I have over 1.4 years of experience in IT Security and Cloud field. I'm proficient in a variety of cutting-edge technologies and always motivated to expand my knowledge and skills. Let's connect and grow together!
OS: Linux/Unix, Mac, Windows Cloud: AWS Containers: Docker Version Control: GIT, GitHub, GitLab, Bitbucket. CI/CD Tools: Jenkins Container Orchestration: Kubernetes Languages: Python, PowerShell, Shell scripting IAC: Terraform, Ansible, Chef, AWS Cloud Formation Web: Apache, Nginx, Tomcat
Open to opportunities. 🌱 #DevOps #AWS #CI/CD #Containers #Python #IaC #Cloud #Blogging #OpenToOpportunities
Elastic Compute Cloud
Scalability
Have 2 Storage options EBS and Instance Storage
Preconfigured Template
20 Instances per region
Types of EC2 Instances
General Purpose:- Balanced Memory & CPU
Compute Optimized -: More CPU than RAM
Memory Optimized -: More RAM
High Memory Optimized -: High RAM, Nitro System
Accelerated Computing /GPU-: Graphic Optimized, ex - PUBG
Storage Optimized -: Low latency
Questions:-
What is the Stand for EC2?
what is EC2?
What is Scalability?
In the EC2 instance have preconfigured templates available?
How many instances can you launch in one region?
What is Compute?
How many Types of Instance?
Type of Instances
Types of Instances:-
General Purpose
Compute Optimized
Memory Optimized
High Memory
Accelerated Computing
Storage Optimized
Previous generation
General-purpose instances:- Provide a balance of computing memory and networking resources and can be used for a variety of workloads.
| A - Series | A1 medium |
| T - Series | T2, t2 micro, t3, t3a |
| M - Series | M4, M5, M5d |
A1- Instances
Web server
Containerized microservices
Caching fleets
Distributed data stores
T2 - Instances
Generally for Development
Very Cheap
Baseline CPU performance
5 to 32 GB
M4 instance
Nitro Hypervisor
RAM 8 to 64 GB
EBS Storage
Questions:-
What is a General Purpose instance?
How many types of series in general purpose?
Compute Optimized:- Ek Sath bahut sari process (Batch Process /Parrallel Processing )ko execute karne ke liya ham Cpmpute Optimized Instances ka use karte hain.
High Performance Processor
Cost Effective
C - Series (c3,c4,c5)
Good Speed
Only EBS Storage
User Cases - High Performance, Webserver, Gaming, Video, Encoding
C5 Support max 25 EBS Volumes
C5 use Elastic network Adapter
C5 uses new EC2 Hypervisor
ENA - for improving your network is used ENA.
Questions:-
What is compute optimized?
What is batch processing?
What is Parrallel processing?
How many types of Series in compute optimized?
How many EBS volume support -25 EBS volume?
Which hypervisor use this - nitro hypervisor?
Note -: where you need high memory instances so use this instances
Ex - | Â for using space monitoring |
Designing for fast performance
| R= R4,R5, R5ad, R5d | X = x1, x1e | Z -z1d |
| High Performance | High performance database | 1.8 tb |
| RAM is enough | This is use for scientific reason | SSD storage |
| Use in relational database | Use in relational database mysql | |
| Use in-memory caching | Nasa me iska use kiya jata hai | |
| Instance storage - EBS, Only and NVM, SSD | Nvm, SSD |
What is SOI?
Use design for workload for hight and
Sequential read and write access to very large data .
At the same time are using upload and download
Types of Series
| I=i3 and i3en | D | H |
| < | < | < |
| Advanced | 16 HDD Based local storage | |
| Nvme , SSD | SSD | HDD |
| Sequential throughput |
Direct Attach Storage - which storage attach with your system is called direct attach storage.
Network Attach Storage - EBS , Jo kahi or rakhi hoti hain or hamare system ke sath attach hoti hai .
Nitro System - A kind of hypervisor.
Using for live processing
Live streaming
FPGA use in real time processing like you are recording video
Series (PGF)
High memory performance
This is only work on Dedicated host
Purchasing only for 3 year
Os installed directly on hardware
Baremetal instance - os seedha hardware me install hoga
This is U series
448 logical processor
Baremetal - hardware me os installed hota hai
Elastic IP = Static Ip
Can we purchase right now - yes
When your billing start - start from rebooting
Pay per second option are available only linux and ubuntu not in windows server
EC2 Instance Purchasing Options
| On-Demand | Using for testing purpose so you can go with this instance, Use for Short term goals, For testing Purpose |
| Dedicated Instance | Only dedicated instances are available in The Dedicated instances While stop - no bill generate |
| Dedicated Host | Physical server where is running your instances , If you are using license for software so you can use dedicated host, While stop - no bill generate, Can you migrate - no |
| Spot Instances | This is very cheap instances. This is free instances are available in spot instance. This is using for testing purpose. Aws ye Kabhi bhi le skte hi jab uski price badh jayegi Stop - karoge to sab data ud jayega |
| Schedule Instances | If your office open only sat, sun so you can use schedule instances You pay for the price, if you are use or not doesn't matter. |
| Reserved Instance | You can reserve for 1-3 yeas |
EC2 Instance :- Few important point
EC2 Access
To access instances, you need a key and key pair name
You can download the private key only once
The public key is saved by AWS to match it to the key pair name and private key when you try to login to the EC2 instances
Without key pair you cannot access instances via RDP or SSH
20instances per region
EC2 Status Check
By Default AWS EC2 service performs automated status checks every one minute.
EC2 services can send its metric data to aws CloudWatch Every 5 minute (Enable By Default)
There is no charged if instances will be stop.
Two Type of Storage
EBS backed EC2 instance - Network Attached storage | It means Jiska Root volume EBS hai - At where your os is installed |
Instance Store Backed EC2 instance - Direct Attached Storage | It means Jiska Root Volume EC2 instance hai - At where your os is installed |
When you Stop an EBS Backed EC2 Instance
Instance perform a shutdown
State changes from running --> stopping
EBS volume remain attached to the instance
Any data cached in RAM or instances store volume
EC2 Termination
When you terminate a running instances the instance states changes as follow -
- Running ---> Shutting down ---> Terminated
During the shutting down and terminated states, you do not changes
By default EBS root devices volumes are deleted automatically when the EC2 instances are terminated
if you untic the termination policy so volume will not be terminated ---> termination proteciton
EC2 Metadata - Information of instances is called is metadata
Ex - IP
Metadata is not protected by encryption
You can check metadata of instances - http://169.254.169.254/latest/meta-data/
Diff b/w Elastic Block Storage /Instance Storage
EBS | Instances Storage |
Most common, replicate with A-Z | Physically attach to the host server |
If detached EBS from instances so it is not affect to ec2 | Data not lost when os is rebooted |
Network attach storage (NAS) | Direct Attach Storage (DAS) |
 it is not | Faster |
You can DE attach the EBS | You cannot DE attach the Instance Storage |




