Overview
An instance is a virtual server in the cloud. Its configuration at launch is a copy of the AMI that you specified when you launched the instance.
You can launch different types of instances from a single AMI. An instance type essentially determines the hardware of the host computer used for your instance.There are dozens of instance types available, varying in the following dimensions:
- Virtual CPUs (vCPUs)
- Memory
- Storage (size and type)
- Network performance
Instance types are grouped into families based on the ratio of these values to each other.
General Purpose
General purpose instances provide a balance of compute, memory and networking resources, and is Ideal for applications that use these resources in equal proportions
M5 and M5a instances
These instances provide an ideal cloud infrastructure, offering a balance of compute, memory, and networking resources for a broad range of applications that are deployed in the cloud. They are well-suited for the following:
-
Small and midsize databases
-
Data processing tasks that require additional memory
-
Caching fleets
-
Backend servers for SAP, Microsoft SharePoint, cluster computing, and other enterprise applications
M5zn
These instances are ideal for applications that benefit from extremely high single-thread performance, high throughput, and low latency networking. They are well-suited for the following:
-
Gaming
-
High performance computing
-
Simulation modeling
M6g and M6gd instances
These instances are powered by AWS Graviton2 processors and deliver balanced compute, memory, and networking for a broad range a general purpose workloads. They are well suited for the following:
-
Application servers
-
Microservices
-
Gaming servers
-
Midsize data stores
-
Caching fleets
Mac1 instances
These instances are powered by Apple Mac mini computers. They provide up to 10 Gbps of network bandwidth and 8 Gbps EBS bandwidth through high-speed Thunderbolt 3 connections. They are well suited to develop, build, test, and sign applications for Apple devices, such as iPhone, iPad, iPod, Mac, Apple Watch, and Apple TV.
T2, T3, T3a, and T4g instances(Burstable performance instances)
These instances provide a baseline level of CPU performance with the ability to burst to a higher level when required by your workload. An Unlimited instance can sustain high CPU performance for any period of time whenever required. They are well-suited for the following:
-
Websites and web applications
-
Code repositories
-
Development, build, test, and staging environments
-
Microservices
Burstable performance instance requirements
-
The supported instance families are: T2, T3, T3a, and T4g.
-
The supported purchasing options are: On-Demand Instances, Reserved Instances, Dedicated Instances, and Spot Instances. These instances are not supported on a Dedicated Host.
-
Ensure that the instance size you choose passes the minimum memory requirements of your operating system and applications.
Best practices
Follow these best practices to get the maximum benefit from burstable performance instances.
-
Use a recommended AMI – Use an AMI that provides the required drivers.
-
Turn on instance recovery – Create a CloudWatch alarm that monitors an EC2 instance and automatically recovers it if it becomes impaired for any reason.
CPU credits
- A CPU Credit provides the performance of a full CPU core for one minute, the following scenarios all use one CPU credit:
-
One vCPU at 100% utilization for one minute
-
One vCPU at 50% utilization for two minutes
-
Two vCPUs at 25% utilization for two minutes
-
- The baseline utilization and ability to burst are governed by CPU credits.
- Each T instance receives CPU Credits continuously, the rate of which depends on the instance size
- If the instance does not use the credits it receives, they are stored in its CPU Credit balance
- While earned credits never expire on a running instance, there is a limit to the number of earned credits that an instance can accrue.
-
For T2, the CPU credit balance does not persist between instance stops and starts. If you stop a T2 instance, the instance loses all its accrued credits.
-
For T3 and T4g, the CPU credit balance persists for seven days after an instance stops and the credits are lost thereafter.
- Maximum earned credit balance for an instance is equal to the number of CPU credits received per hour times 24 hours
-
Launch credits
-
T2 Standard instances receive Launch credits to provide a good startup experience, but T2 Unlimited instances do not(no need).
-
T3 and T4g instances(Standard or Unlimited) never receive launch credits.
-
T2 Standard instances get