Recently, I’ve been using AWS a lot at work, so I thought I might as well try to get certified.
At work, I use serverless, so I kind of understand Lambda, but I don’t really get EC2, so here are my notes.
The official name is Amazon Elastic Compute Cloud
.
Elastic
means “flexible” or “scalable”.
With EC2, you can run as many instances
as you need, when you need them.
A common question related to EC2 is about EBS
. There’s also something called EFS
, which is a bit confusing, so it’s good to remember both.
The official name is Amazon Elastic Block Store
.
It’s a block storage volume that you attach to EC2 instances.
*IOPS means the number of I/O accesses per second that a disk can perform.
Traffic to EC2 instances is controlled by security groups
.
EC2 uses a key pair authentication method by default, which involves a public key and a private key. By using this key pair to log in, you can operate the operating system with administrator privileges.
On-Demand Instances
Reserved Instances
Spot Instances
Dedicated Hosts
Another confusing service starting with ‘E’ is ELB
, which stands for Elastic Load Balancing
.
To mitigate the impact of failures, you can distribute EC2 instances across multiple availability zones and use ELB
to route incoming traffic to these instances. This increases the availability of your application.
Since ELB is a managed service with high availability, it itself does not become a single point of failure.
Application Load Balancer
Network Load Balancer
ELB can automatically perform health checks on the instances registered as targets and will only route requests to healthy instances.
With Auto Scaling
, you don’t have to predict how many EC2 instances you need. It automatically adjusts the number of instances based on the current demand.
Amazon Elastic File System
is a file storage service that can be shared across multiple EC2 instances. This is also commonly asked in relation to EC2.
EBS
Instance Store
S3
EFS