Skip to main content

Command Palette

Search for a command to run...

2. EC2 - Elastic Compute Cloud

Updated
•7 min read
2. EC2 - Elastic Compute Cloud
S

👋 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

💡
EC2 - Elastic Compute Cloud
💡
EC2 - This is a Virtual Server/Machine
  • Scalability

  • Have 2 Storage options EBS and Instance Storage

  • Preconfigured Template

  • 20 Instances per region

💡
Compute - has the understanding to execute and run applications and software. 

Types of EC2 Instances

  1. General Purpose:- Balanced Memory & CPU

  2. Compute Optimized -: More CPU than RAM

  3. Memory Optimized -: More RAM

  4. High Memory Optimized -: High RAM, Nitro System

  5. Accelerated Computing /GPU-: Graphic Optimized, ex - PUBG

  6. 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:-

  1. General Purpose

  2. Compute Optimized

  3. Memory Optimized

  4. High Memory

  5. Accelerated Computing

  6. Storage Optimized

  7. Previous generation

💡
General Purpose Instance

General-purpose instances:- Provide a balance of computing memory and networking resources and can be used for a variety of workloads.

💡
3 Series in General Purpose
A - SeriesA1 medium
T - SeriesT2, t2 micro, t3, t3a
M - SeriesM4, 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 Instances

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?


💡
Memory Optimized Instances

Note -: where you need high memory instances so use this instances

Ex -

 for using space monitoring

Designing for fast performance

R= R4,R5, R5ad, R5dX = x1, x1eZ -z1d
High PerformanceHigh performance database1.8 tb
RAM is enoughThis is use for scientific reasonSSD storage
Use in relational databaseUse in relational database mysql
Use in-memory cachingNasa me iska use kiya jata hai
Instance storage - EBS, Only and NVM, SSDNvm, SSD

💡
Storage Optimized Instances

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 i3enDH
<<<
Advanced16 HDD Based local storage
Nvme , SSDSSDHDD
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.


💡
Acelerating Computing  Instance
  • Using for live processing

  • Live streaming

  • FPGA use in real time processing like you are recording video

  • Series (PGF)


💡
High Memory Instances
  • 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


💡
Previous Generation Instances
  • 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-DemandUsing for testing purpose so you can go with this instance, Use for Short term goals, For testing Purpose
Dedicated InstanceOnly dedicated instances are available in The Dedicated instances While stop - no bill generate
Dedicated HostPhysical 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 InstancesThis 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 InstancesIf 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 InstanceYou 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

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

More from this blog

Sudheer sen's blog

17 posts

👋 Hello! I'm passionate about DevOps & AWS Cloud. I have over 2 years of experience in IT Security and Cloud field. I'm proficient in a variety of cutting-edge technologies.