EC2 Basics Flashcards
Amazon EC2
Elastic Compute Cloud
This is the way to do Infrastructure as a Service
What does EC2 consist of?
- Renting virtual machines (EC2)
- Storing data on virtual drives (EBS)
- Distributing load across machines (ELB)
- Scaling the services using an auto-scaling group (ASG)
EC2 sizing & configuration options
- Operating System: Linux, Windows or Mac
How much of the following you want:
- Compute power & cores (CPU)
- Random-access memory (RAM)
- 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
Bootstrapping
Launching commands when a machine starts
That script 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 more you add into the user data script the more the instance has to do at boot time
Does the EC2 User Data Script runs with the root user?
Yes, any command you have will have the sudo rights
EC2 instance types
Instance | vCPU | Mem | Stge | Network Perf | EBS
t2.micro | 1 | 1 | EBS-Only| Low to Mod |
t2.xlarge | 4 | 16 | EBS-Only| Moderate |
c5d.4xlarge |16|32|1x400 NVMe SSD|Up to 10 Gb
| 4,750
r5.16xlarge | 64 | 512 | EBS-Only| 20 Gb | 13,600
m5.8xlarge | 32 | 128 | EBS-Only| 10 Gb | 6,800
** t2.micro is part of the AWS free tier (up to 750 hours per month) **