EC2 - Sizing & configurations
Operating System (OS): Linux, Windows or Mac OS
How much compute power & cores (CPU)
How much random-access memory (RAM)
How much storage space:
Network-attached (EBS & EFS)
hardware (EC2 Instance Store)
Network card: speed of the card, Public IP address
Firewall rules: security group
Bootstrap script (configure at first launch): EC2 User Data
Sizing
You can use different types of EC2 instances that are optimised for different use cases (https://aws.amazon.com/ec2/instance-types/)
m5.2xlarge
m: instance class
5: generation (AWS improves them over time)
2xlarge: size within the instance class
EC2 Instance Types
General Purpose
Great for a diversity of workloads such as web servers or code repositories
Balance between:
Compute
Memory
Networking
Compute Optimized
Memory Optimized
Storage Optimized
Some T2 type examples
Instance
vCPU*
CPU Credits / hour
Mem (GiB)
Storage
Network Performance
t2.nano
1
3
0.5
EBS-Only
Low
t2.micro
1
6
1
EBS-Only
Low to Moderate
t2.small
1
12
2
EBS-Only
Low to Moderate
t2.medium
2
24
4
EBS-Only
Low to Moderate
t2.large
2
36
8
EBS-Only
Low to Moderate
t2.xlarge
4
54
16
EBS-Only
Moderate
t2.2xlarge
8
81
32
EBS-Only
Moderate
EC2 User Data
It is possible to bootstrap our instances using an EC2 User data script.
bootstrapping means launching commands when a machine starts.
That script is only run once at the instance first start.
EC2 user data is used to automate boot tasks such as:
Installing updates
Installing software
Downloading common files from the internet
Anything you can think of
The EC2 User Data Script runs with the root user.
Last updated