EC2 Virtual Machines - storage - load balancing Flashcards
What is Amazon EC2?
Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing capacity in the Amazon Web Services (AWS) Cloud.
- EC2 is one of the most popular of AWS’ offering
- EC2 = Elastic Compute Cloud = Infrastructure as a Service
- It mainly consists in the capability 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) - Knowing EC2 is fundamental to understand how the Cloud works
Bootstrap script
Is configure at first launch: EC2 User Data
On-demand EC2
- Low cost, no upfront payments(commitments)
- Use for workloads that cannot be predicted or interrupted
- Developing applications
- Workload will not run longer than a year
- High availability
- Disaster recovery
- Coming and staying in resort whenever we like, we pay the full price
Spot instances EC2
- Cheapest option
- Takes advantages of unused EC2 instances
- Not concerned with start or stop times
- Workload is interrupted
- the hotel allows people to bid for the empty rooms and the highest bidder keeps the rooms. You can get kicked out at any time
Dedicated Hosts EC2
- Dedicated servers that are reserved to run only your instances
- You can bring your own server licenses
- Company compliance requirement during tenancy
Dedicated Host vs Dedicated Instance
Dedicated Hosts = Dedicated Server
Dedicated Instances RUNS on dedicated Hosts
Reserved Instances EC2
- Specify instance for 1-3 years
- Can pay upfront
- Choice to pay or not, if pay upfront get a bigger
discount - Your application requires a capacity application
- like planning ahead and if we plan to stay for a long time, we may get a good discount.
Savings plan EC2
- Commit compute usage 1-3 years
- Lower bill across multiple services
- Flexibility to change compute services, instance types, OSs or regions
- pay a certain amount per hour for certain period and stay in any room type (e.g., King, Suite, Sea View, …)
Capacity Reservations
you book a room for a period with full price even you don’t stay in it
Classic EC2 Load Balancing
- EC2 classic network
- Layer 4/7
Gateway EC2 Load Balancing
- Use for network logging and monitoring with a 3rd-party virtual appliance
- Layer 3/4
Application EC2 Load Balancing
- Flexible application management
- Layer 7
- HTTP + HTTPS
Network EC2 Load Balancing
- Extreme performance and static IP address
- Layer 4
- TCP + UDP + TLs protocols and static IPs
Connect to a EC2 instance (not linux)
- Management console
- Instance Connect
- SSH
- RDP
- System Manager
Connect to a Linux EC2 instance
- SSH
- AWS Systems Manager Session Manager
- AWS CLI