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:
Instance types are grouped into families based on the ratio of these values to each other.
General purpose instances provide a balance of compute, memory and networking resources, and is Ideal for applications that use these resources in equal proportions
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
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
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
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.
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
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.
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.
One vCPU at 100% utilization for one minute
One vCPU at 50% utilization for two minutes
Two vCPUs at 25% utilization for two minutes
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.
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 30 launch credits per vCPU at launch or start.
Launch credits are spent first, before earned credits. Unspent launch credits are accrued in the CPU credit balance, but do not count towards the CPU credit balance limit.
There is a limit to the number of times T2 Standard instances can receive launch credits. The default limit is 100 launches or starts of all T2 Standard instances combined per account, per Region, per rolling 24-hour period.
(number of credits earned/number of vCPUs)/60 minutes = % baseline utilization
A t3.nano
instance, with 2 vCPUs, earns 6 credits per hour, resulting in a baseline utilization of 5% ((6/2)/60
).
A t3.xlarge
instance, with 4 vCPUs, earns 96 credits per hour, resulting in a baseline utilization of 40% ((96/4)/60
).
The unlimited
mode is a credit configuration option for burstable performance instances.
It can be enabled or disabled at any time for a running or stopped instance.
You can set unlimited
as the default credit option at the account level per AWS Region, per burstable performance instance family
A burstable performance instance configured as unlimited
can sustain high CPU utilization for any period of time whenever required.
If a burstable performance instance configured as unlimited
depletes its CPU credit balance, it can spend surplus credits to burst beyond the baseline. When its CPU utilization falls below the baseline, it uses the CPU credits that it earns to pay down the surplus credits that it spent earlier.
The hourly instance price automatically covers all CPU usage spikes if the average CPU utilization of the instance is at or below the baseline over a rolling 24-hour period or the instance lifetime, whichever is shorter.
If you use a t2.micro
or t3.micro
instance under the AWS Free Tier offer and use it in unlimited
mode, charges might apply if your average utilization over a rolling 24-hour period exceeds the baseline utilization of the instance.
T3 and T4g instances launch as unlimited
by default. If the average CPU usage over a 24-hour period exceeds the baseline, you incur charges for surplus credits
The breakeven CPU usage helps you determine when to use unlimited mode versus fixed CPU:
If the average CPU usage over a 24-hour period is at or below the breakeven CPU usage, use a burstable performance instance in unlimited
mode so that you can benefit from the lower price of a burstable performance instance while getting the same performance as a fixed performance instance.
If the average CPU usage over a 24-hour period is above the breakeven CPU usage, the burstable performance instance will cost more than the equivalently-sized fixed performance instance. If a T3 instance continuously bursts at 100% CPU, you end up paying approximately 1.5 times the price of an equivalently-sized M5 instance.
Surplus credits that were spent earlier are charged when any of the following occurs:
The spent surplus credits exceed the maximum number of credits the instance can earn in a 24-hour period. Spent surplus credits above the maximum are charged at the end of the hour.
The instance is stopped or terminated.
The instance is switched from unlimited
to standard
.
Spent surplus credits are tracked by the CloudWatch metric CPUSurplusCreditBalance
. Surplus credits that are charged are tracked by the CloudWatch metric CPUSurplusCreditsCharged
CPUCreditBalance
is a CloudWatch metric that tracks the number of credits accrued by an instance. CPUSurplusCreditBalance
is a CloudWatch metric that tracks the number of surplus credits spent by an instance.
When you change an instance configured as unlimited
to standard
, the following occurs:
The CPUCreditBalance
value remains unchanged and is carried over.
The CPUSurplusCreditBalance
value is immediately charged.
When a standard
instance is switched to unlimited
, the following occurs:
The CPUCreditBalance
value containing accrued earned credits is carried over.
For T2 Standard instances, any launch credits are removed from the CPUCreditBalance
value, and the remaining CPUCreditBalance
value containing accrued earned credits is carried over.
standard
is suited to workloads with an average CPU utilization that is consistently below the baseline CPU utilization of the instance.Ideal for compute bound applications that benefit from high performance processors
These instances are well suited for the following:
Batch processing workloads
Media transcoding
High-performance web servers
High-performance computing (HPC)
Scientific modeling
Dedicated gaming servers and ad serving engines
Machine learning inference and other compute-intensive applications
These instances are powered by AWS Graviton2 processors and are ideal for running advanced, compute-intensive workloads, such as the following:
High-performance computing (HPC)
Batch processing
Ad serving
Video encoding
Gaming servers
Scientific modeling
Distributed analytics
CPU-based machine learning inference
Memory optimized instances are designed to deliver fast performance for workloads that process large data sets in memory.
These instances are well suited for the following:
High-performance, relational (MySQL) and NoSQL (MongoDB, Cassandra) databases.
Distributed web scale cache stores that provide in-memory caching of key-value type data (Memcached and Redis).
In-memory databases using optimized data storage formats and analytics for business intelligence (for example, SAP HANA).
Applications performing real-time processing of big unstructured data (financial services, Hadoop/Spark clusters).
High-performance computing (HPC) and Electronic Design Automation (EDA) applications.
These instances are powered by AWS Graviton2 processors and are ideal for running memory-intensive workloads, such as the following:
Open-source databases (for example, MySQL, MariaDB, and PostgreSQL)
In-memory caches (for example, Memcached, Redis, and KeyDB)
These instances offer 6 TiB, 9 TiB, 12 TiB, 18 TiB, and 24 TiB of memory per instance. They are designed to run large in-memory databases, including production deployments of the SAP HANA in-memory database.
These instances are well suited for the following:
In-memory databases such as SAP HANA, including SAP-certified support for Business Suite S/4HANA, Business Suite on HANA (SoH), Business Warehouse on HANA (BW), and Data Mart Solutions on HANA.
Big-data processing engines such as Apache Spark or Presto.
High-performance computing (HPC) applications.
These instances are well suited for the following:
High-performance databases.
In-memory databases such as SAP HANA
Memory-intensive enterprise applications.
These instances are well suited for the following:
In-memory databases, such as Redis and Memcached.
Relational databases, such as MySQL and PostGreSQL.
Electronic design automation (EDA) workloads, such as physical verification and layout tools.
Memory-intensive workloads, such as real-time analytics and real-time caching servers.
These instances deliver both high compute and high memory and are well-suited for the following:
Electronic Design Automation (EDA)
Relational database workloads
Accelerated computing instances use hardware accelerators, or co-processors, to perform functions, such as floating point number calculations, graphics processing, or data pattern matching, more efficiently than is possible in software running on CPUs.
GPU-based instances provide access to NVIDIA GPUs with thousands of compute cores. You can use these instances to accelerate scientific, engineering, and rendering applications by leveraging the CUDA or Open Computing Language (OpenCL) parallel computing frameworks. You can also use them for graphics applications, including game streaming, 3-D application streaming, and other graphics workloads.
These instances are designed to accelerate machine learning using AWS Inferentia, a custom AI/ML chip from Amazon that provides high performance and low latency machine learning inference. These instances are optimized for deploying Deep Learning (DL) models for applications, such as natural language processing, object detection and classification, content personalization and filtering, and speech recognition.
FPGA-based instances provide access to large FPGAs with millions of parallel system logic cells. You can use FPGA-based accelerated computing instances to accelerate workloads such as genomics, financial analysis, real-time video processing, big data analysis, and security workloads by leveraging custom hardware accelerations.
Storage optimized instances are designed for workloads that require high, sequential read and write access to very large data sets on local storage. They are optimized to deliver tens of thousands of low-latency, random I/O operations per second (IOPS) to applications.
These instances are well suited for the following:
Massive parallel processing (MPP) data warehouse
MapReduce and Hadoop distributed computing
Log or data processing applications
These instances offer scale out of instance storage and are well suited for the following:
Distributed file systems for Hadoop workloads
File storage workloads such as GPFC and BeeFS
Large data lakes for HPC workloads
These instances are well suited for the following:
Data-intensive workloads such as MapReduce and distributed file systems
Applications requiring sequential access to large amounts of data on direct-attached instance storage
Applications that require high-throughput access to large quantities of data
These instances are well suited for the following:
High frequency online transaction processing (OLTP) systems
Relational databases
NoSQL databases
Cache for in-memory databases (for example, Redis)
Data warehousing applications
Distributed file systems
Workloads that require access to low-level hardware features (for example, Intel VT) that are not available or fully supported in virtualized environments
Applications that require a non-virtualized environment for licensing or support
The following instances are built on the Nitro System:
Virtualized: A1, C5, C5a, C5ad, C5d, C5n, C6g, C6gd, C6gn, D3, D3en, G4, I3en, Inf1, M5, M5a, M5ad, M5d, M5dn, M5n, M5zn, M6g, M6gd, p3dn.24xlarge
, P4, R5, R5a, R5ad, R5b, R5d, R5dn, R5n, R6g, R6gd, T3, T3a, T4g, high memory (u-*), X2gd, and z1d
Bare metal: a1.metal
, c5.metal
, c5d.metal
, c5n.metal
, c6g.metal
, c6gd.metal
, i3.metal
, i3en.metal
, m5.metal
, m5d.metal
, m5dn.metal
, m5n.metal
, m5zn.metal
, m6g.metal
, m6gd.metal
, mac1.metal
, r5.metal
, r5b.metal
, r5d.metal
, r5dn.metal
, r5n.metal
, r6g.metal
, r6gd.metal
, u-6tb1.metal
, u-9tb1.metal
, u-12tb1.metal
, u-18tb1.metal
, u-24tb1.metal
, x2gd.metal
, and z1d.metal
You can also generate an AMI image directly from a running instance-attached EBS volume—although, to be sure no data is lost, it’s best to shut down the instance first.
EBS volumes can be
ideal for temporary storage of information that changes frequently, such as buffers, caches, scratch data, and other temporary content, or for data that is replicated across a fleet of instances, such as a load-balanced pool of web servers.
Data in the instance store is lost when:
Provisioned IOPS—which in some contexts is referred to as EBS Optimized
For workloads requiring greater network performance
Enhanced networking reduces the impact of virtualization on network performance by enabling a capability called Single Root I/O Virtualization (SR-IOV). This results in more Packets Per Second (PPS), lower latency, and less jitter.
Enhanced networking is available only for instances launched in an Amazon VPC(Amazon Virtual Private Cloud)
Some instances use a network I/O credit mechanism to allocate network bandwidth to instances based on average bandwidth utilization. They accrue credits when their bandwidth is below their baseline bandwidth, and can use these credits when they perform network data transfers
If the root device for your instance is an EBS volume, you can change the size of the instance by changing its instance type.
If the root device for your instance is an instance store volume, you must migrate your application to a new instance with the instance type that you need.
You must select an instance type that is compatible with the configuration of the instance. If the instance type that you want is not compatible with the instance configuration you have, then you must migrate your application to a new instance with the instance type that you need.
To change the instance type, the instance must be in the stopped
state.
You cannot resize an instance if hibernation is enabled.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts.html
https://aws.amazon.com/ec2/?ec2-whats-new.sort-by=item.additionalFields.postDateTime&ec2-whats-new.sort-order=desc
AWS Certified Solutions Architect Official Study Guide - Associate
AWS Certified Solutions Architect Study Guide- Associate 2nd Edition