Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • DevOps Lifecycle
  • DevOps Roadmap
  • Docker Tutorial
  • Kubernetes Tutorials
  • Amazon Web Services [AWS] Tutorial
  • AZURE Tutorials
  • GCP Tutorials
  • Docker Cheat sheet
  • Kubernetes cheat sheet
  • AWS interview questions
  • Docker Interview Questions
  • Ansible Interview Questions
  • Jenkins Interview Questions
Open In App
Next Article:
AWS EC2 On Demand and Spot Instances
Next article icon

Amazon EC2 - Instance Types

Last Updated : 03 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Pre-requisites: AWS

Different Amazon EC2 instance types are designed for certain activities. Consider the unique requirements of your workloads and applications when choosing an instance type. This might include needs for computing, memory, or storage.

What are the AWS EC2 Instance Types?

The AWS EC2 Instance Types are as follows:

  1. General Purpose Instances
  2. Compute Optimized Instances
  3. Memory-Optimized Instances
  4. Storage Optimized Instances
  5. Accelerated Computing Instances
Instance types

1. General-Purpose Instances

The computation, memory, and networking resources in general-purpose instances are balanced. Scenarios, where you can use General Purpose Instances, are gaming servers, small databases, personal projects, etc. Assume you have an application with a kind of equal computing, memory, and networking resource requirements. Because the program does not require optimization in any particular resource area, you can use a general-purpose instance to execute it.

Examples:

  • The applications that require computing, storage, networking, server performance, or want something from everything, can utilize general-purpose instances.
  • If high-performance CPUs are not required for your applications, you can go for general-purpose instances.

EC2 General-Purpose Instance Types

Here are several general-purpose examples from which we can pick:

T2. micro: The most well-known instance in AWS is t2.micro, which gives 1 CPU and 1 GB of memory with low to moderate network performance. It is also free and highly helpful for individuals first starting AWS.
M6a Instance: The third-generation AMD EPYC processors used in the M6 instance are perfect for general-purpose tasks. In m6a there are different sizes like m6a.large, m6a.2xlarge, m6a.4xlarge, and so on. m6a.large offers 2 CPUs, 8GiB memory, and network performance up to 12.5 Gigabit.
M5 instance: The newest generation of general-purpose instances, known as M5, are powered by Intel's Xeon Platinum 8175 processors. Its M5 divisions include m5. large, m5.12xlarge, and m5.24 large, and the sort of M5 service we select will depend on memory, CPUs, storage, and network speed.

Features

  • Powered by specifically designed AWS Graviton3 processors.
  • Default optimized with EBS.
  • It consists of dedicated hardware and a lightweight hypervisor.
  • The bandwidth is higher when compared to other types.

Applications

  1. Web Servers: The web servers can be hosted in General-purpose instances. EC2 instances provide a flexible and scalable platform for web applications.
  2. Development and Test Environment: The developers can use these General-purpose instances to build, test and deploy the applications. It is a cost-effective solution for running this environment. 
  3. Content delivery: The hosting of content delivery networks (CDNs) that distribute content to users all over the world is possible using general-purpose instances. EC2 instances can be set up to provide content with low latency and great performance.

A popular option for many businesses, AWS EC2 general-purpose instances offer a versatile and scalable platform for a variety of applications.

2. Compute-Optimized Instances 

Compute-optimized instances are appropriate for applications that require a lot of computation and help from high-performance CPUs. You may employ compute-optimized instances for workloads including web, application, and gaming servers just like general-purpose instances. This instance type is best suited for high-performance applications like web servers, Gaming servers.

Examples

  • Applications that require high server performance or that employ a machine-learning model will benefit from compute-optimized instances.
  • If you have some batch processing workloads or high-performance computing.

Compute-Optimized Some Instance Types

  1. c5d.24large: The c5d instance, which has 96 CPUs, 192 GiB of RAM, 3600 GB of SSD storage, and 12 Gigabit of network performance, was selected primarily for its excellent web server performance. There are other instance types, including giant and extra-large. Depending on our needs, we will choose between the c5a big and extra-large instance types.

Features

  • Powered by specifically designed AWS Graviton3 processors.
  • It will use DDR5 memory, by which it will get 50% more bandwidth than DDR4.
  • By default EBS optimization.

Applications

  1. Machine learning: Machine learning operations can be performed on Compute-optimized instances because it will manage heavy workloads. The processing capacity required to swiftly and effectively train massive machine learning models can be provided by compute-optimized instances.
  2. Gaming: Compute-optimized is well suited for heavy workloads so it can easily manage the Gaming operations easily. Compute-optimized will decrease the latency and it can deliver a high-quality gaming experience.

3. Memory-Optimized Instances

Memory-optimized instances are geared for workloads that need huge datasets to be processed in memory. Memory here defines RAM which allows us to do multiple tasks at a time. Data stored is used to perform the central processing unit (CPU) tasks it loads from storage to memory to run. This process of preloading gives the CPU direct access to the computer program. Assume you have a workload that necessitates the preloading of significant volumes of data prior to executing an application. A high-performance database or a task that requires real-time processing of a significant volume of unstructured data might be involved in this scenario. In this case, consider using a memory-optimized instance. It is used to run applications that require a lot of memory with high performance.

Examples:

  • Helpful for databases that need to handle quickly.
  • Processes that do not need a large quantity of data yet require speedy and real-time processing. 

Memory-Optimized Some Instance Types

The R and X categories belong to the memory-optimized family. Let's discuss any one-off them.

R7g.medium: It is run on AWS Gravitation processors with ARM architecture. with 1 CPU, 8 (GiB) of memory, an EBS storage type, and a maximum of 12.5% network bandwidth.

x1: X1 is mainly suited for enterprise edition databases with memory applications and comes with 64 vCPU, 976 GiB of memory, 1 x 1,920 GB of SSD storage, 7,000 Mbps of dedicated EBS bandwidth, and 10 Gbps of network performance.

Features

  • Elastic Fabric Adapter (EFA) is supported on the r7g.16xlarge and r7g.metal instances.
  • Includes the newest DDR5 memory, which provides 50% more bandwidth than DDR4.
  • Compared to R6g instances, improved networking bandwidth is 20% more.

Applications

  1. In-Memory Databases: Memory-optimized instances are mostly suited for databases that contain high bandwidth and memory capacity is high.  
  2. Big Data Processing: For big data processing workloads like Apache Spark and Apache Hadoop that demand high memory capacity and bandwidth, memory-optimized instances can be deployed. Instances that have been optimized for memory can offer the memory space and bandwidth required to process huge amounts of data fast and effectively.

4. Storage Optimized Instances

Storage-optimized instances are made for workloads that demand fast, sequential read and write access to huge datasets. Distributed file systems, data warehousing applications, and high-frequency online transaction processing (OLTP) systems are examples of workloads that are suited for storage-optimized instances. Storage-optimized instances are built to provide applications with the lowest latency while accessing the data.

Examples:

  • The applications which high processing of databases can utilize storage-optimized instances.
  • Data Warehousing applications or distributed file systems can use it.

Storage Optimized Instance Types

  1. Im4gn: Because Im4gn is powered by AWS Graviton processors, it offers the best pricing performance for workloads in Amazon EC2 that demand a lot of storage. Im4gn.large's base configuration has 2 CPUs, 8 GiB of memory, and EBS storage with a network bandwidth of up to 25 Gbps. It offers some other instance types of ls4gn, l4i, D, and H. 

Features

  • Using AWS Graviton2 processors, which provide the best price/performance for workloads in Amazon EC2.
  • Geared at tasks that correspond to 4 GB of RAM per vCPU.
  • Improved Networking (ENA)-based Elastic Network Adapter (ENA)-based up to 100 Gbps of network bandwidth.

Applications

  1. Amazon EC2 C5d Instance: It is suitable for applications which are having very high intensive workloads. It can deliver high input and output performance with low latency.
  2. Amazon EC2 I3 instance: The storage-optimized instance is well-suited for applications with high storage needs. It also provides local NVMe storage.

5. Accelerated Computing Instances

Coprocessors are used in accelerated computing instances to execute specific operations more effectively than software running on CPUs. Floating-point numeric computations, graphics processing, and data pattern matching are examples of these functions. A Hardware-Accelerator/ Co-processor is a component in computing that may speed up data processing. Graphics applications, game streaming, and application streaming are all good candidates for accelerated computing instances.

Examples:

  •  If the application utilizes floating-point calculations or graphics processing, accelerated computing instances will be the best among all.
  •  Also, data pattern matching can be done more efficiently with this instance type.

Accelerated Computing Instance Types

  1. Accelerated computing consists of mainly P1, Inf2, G5, G5g, G4dn, G4ad, G3, F1 and VT1.
  2. P4: It offers 3.0 GHz 2nd Generation Intel Xeon Processors. of 8 GPUs, 96 CPUs, and memory of 1152(GiB) with network bandwidth of 400ENA and EFA.

Features

  • 2nd Generation Intel Xeon Scalable processors, 3.0 GHz (Cascade Lake P-8275CL).
  • 8 NVIDIA A100 Tensor Core GPUs maximum.
  • 400 Gbps instance networking with support for NVIDIA GPUDirect RDMA and Elastic Fabric Adapter (EFA) (remote direct memory access).

Applications

  1. Amazon EC2 P3 Instances: High-performance computing, rendering, and machine learning workloads are all well-suited to these instances. Its NVIDIA V100 GPUs enable them to deliver up to 1 petaflop of mixed-precision performance per instance, which makes them perfect for simulations of computational fluid dynamics, molecular dynamics, and complicated deep learning models.
  2. Amazon EC2 G4 Instances: These instances are designed for graphically demanding tasks like video transcoding, virtual desktops, and gaming. They provide up to 65 teraflops of single-precision performance per instance and are driven by NVIDIA T4 GPUs.

AWS Instance Types Pricing

AWS Free tier offers EC2 instances for free. t2.micro instance was for up to a certain limit like 750 hours. If you want to go for a premium plan then it offers three types of plans. They are

On-Demand

On-Demand it charges based on the no. of hours or seconds you use. With the help of on-demand instances, you can avoid maintaining infrastructure costs.

On-Demand Instances are recommended for:

  1. Low cost without any upfront payment or long-term commitment.
  2. For testing applications that are being developed. 

Saving Plan 

When compared to on-demand you can reduce the bill by up to 72%. In order to do that you need to give a commitment to AWS of using for such an amount of time like up to 1 to 3-year term.

Types of saving plans:

  1. Compute Savings Plans.
  2.  EC2 Instance Savings Plans.
  3. SageMaker Savings Plans.

Savings Plans are recommended for:

  1. For faster and newest families.
  2. Steady and consistent usage. 

Amazon EC2 Spot Instances

When compared to other instance plans you can cheaper upto 90% discount. These are unused instances.

Spot Instances are recommended for:

  1. Applications that don't need to save their state.
  2. Application flexible start and end time.

AWS Instance Type Cost Calculator

AWS cost calculator is used for calculating the cost of AWS instances based on the types. This AWS instance-type calculator is a service provided by Amazon itself.

AWS cost calculator

By using the AWS Pricing Calculator you can estimate the cost of services offered by AWS of its pricing. It is very simple to use first you need to open the AWS console and search for AWS Pricing Calculator after that add the service to the calculator that you want to know the cost. After all the configuration is done you will get the estimated cost as a graph or documented format.

Conclusion

Selecting the appropriate Amazon instance type is crucial when installing apps. If the Amazon instance type you selected is inappropriate for the application you intend to install, we may experience a variety of issues, including latency and insufficient storage. When choosing the type of instance, be selective.


Next Article
AWS EC2 On Demand and Spot Instances
author
itsnitish22
Improve
Article Tags :
  • Geeks Premier League
  • Amazon Web Services
  • DevOps
  • Geeks-Premier-League-2022
  • aws-ec2

Similar Reads

  • Amazon RDS Instance Types
    Amazon RDS (Relational Database Service) offers different instance types that take care of various execution and asset necessities. Remember that Amazon Web Services (AWS) as often as possible updates its services, so there may be extra occasion types or changes after my last update. Continuously al
    15+ min read
  • Mount AWS S3 Bucket On Amazon EC2-Instance
    AWS S3 storage service is used for object storage these objects can be termed a file and it's metadata that briefs about it. Well, to store the files and documents we need to create a S3 bucket. It's like a container that stores the files. These files can be pictures, txt file, documents, static web
    3 min read
  • AWS EC2 On Demand and Spot Instances
    In this article, we are going to understand difference between EC2 On demand and Spot instances. We are going to learn their usage and working. it is important to understand the difference between AWS EC2 On Demand and Spot Instances so that you can choose right instances for your business requireme
    6 min read
  • Amazon RDS - Renaming a DB Instance
    This article will cover the steps involved in Renaming a DB Instance. A DB Instance is nothing but a database which includes a bunch of memory structures for managing data files. For more detailed information on the topic give the linked article a read. For renaming an existing DB Instance, Step 1:
    1 min read
  • Amazon RDS - Rebooting a DB Instance
    This article is a step by step guide for Rebooting a DB Instance. But before learning the process of rebooting an instance, we need to know about DB Instances and how to create one on AWS. DB Instance or Database Instance DB Instance is an obscure database dominion running on a cloud platform, here
    4 min read
  • Amazon VPC - Launching an EC2 Instance into a VPC
    This article will cover all the aspects of Launching an EC2 Instance into a VPC. As we are already aware of the basic process of launching an EC2 instance on AWS, launching it into VPC is almost the same. Every EC2 instance launched on AWS is by default launched inside the default VPC of that partic
    3 min read
  • Run Commands on EC2 Instance Remotely
    This article explores the process of running commands on EC2 instance remotely. AWS Systems Manager is a Management Tool that enables you to gain operational insights and take action on AWS resources safely and at scale. AWS Systems Manager is an always free tier product. The EC2 instance you create
    4 min read
  • What is AWS EC2 Instance Storage?
    EC2 Instance storage is the temporary block storage service offered by AWS. EC2 instance storage, in itself, is not a storage service but a part of the EC2 service. These storage devices physically lie on the same host that provides the EC2 instance and are useful for storing temporary data associat
    11 min read
  • Amazon Web Services - Spot Rules in EC2 Spot Instances
    Amazon EC2 Spot Instances let you use extra cloud capacity at a lower price. They can help you save money and run your applications at scale. But since these instances can be interrupted at any time, it’s important to understand how they work. In this article, we are going to walk through a few simp
    4 min read
  • What Is Amazon EMR ?
    Amazon Elastic MapReduce is an important cloud-based platform service that is designed for the effective scaling and processing of large-volume datasets. Its platform facilitates the users in quickly and easily setting up the cluster with Amazon EC2 Instances that are already pre-configured with big
    9 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences