Compute Flashcards
EC2 (Elastic Compute Cloud): 4 facts
- Allows you to rent and manage virtual servers in the cloud.
- AWS’s virtual servers are called instances.
- Elastic - can grow or shrink based on the needs of, or the loads on your application
- Uses virtual servers - compute or processing power in the cloud
Amazon Machine Image (AMI) =
a preconfigured template to launch your instance
4 Methods to manage an EC2 instance:
- AWS Management Console - via web browser
- SSH - from local computer
- EC2 Instance Connect - no need to install an SSH client. EIC allows you to use IAM policies to control SSH access to your instances, removing the need to manage SSH keys.
- AWS Systems Manager - allows you to manage your EC2 Instances via a web browser (interactive one-click browser based shell) or the AWS CLI
The most common way to connect to a Linux EC2 Instance
via a Secure Shell (SSH)
- On-Demand Instances:
- fixed price billed down to the second, based on what you use. No contract.
Common use cases: - ideal for low cost without up-front payment or long-term commitment; unpredictable workloads that can’t be interrupted; for applications that are under development; for workloads that will not run longer than a year.
- Spot Instances
(least expensive option):
-Lets you take advantage of unused EC2 capacity. Your request is fulfilled only if capacity is available.
Common use cases:
- you are not concerned about the start or stop time of your application; your workloads can be interrupted; your application is only feasible at very low compute prices;
- you pay the spot price that’s in effect at the beginning of the hour; up to 90% less than on-demand.
- Reserved Instances
- RIs allow you to commit to a specific instance type in a particular region for 1 to 3 years.
Common use cases: - your application has/needs steady state usage; can commit to 1or 3 years; can pay upfront to receive a discount on on-demand prices; your application requires a capacity reservation.
- can save 75% off on-demand; requires a contract; can reserve capacity in an AZ for any duration; can pay all, partial, or no upfront - all upfront earns the highest discount.
- Provides convertible types at 54% discount - if you need additional flexibility (change the instance family, change the OS, etc.)
- Dedicated Hosts:
Allows you to pay for a physical server that is fully dedicated to running your instances.
Use cases:
- You want to bring your own server-bound software license from vendors like Microsoft or Oracle; you have regulatory or corporate compliance requirements around a tenancy model.
- can save up to 70% off on-demand prices; your bring your existing per-socket, per-core, or per-VM software licenses; the server is NOT shared with other customers (no multi-tenancy); a Dedicated Host is a physical server, whereas a Dedicated Instance runs on the host.
- Savings Plans:
Allows you to commit to compute usage (measured per hour) for 1 or 3 years.
Use cases:
- you want to lower your bill across multiple compute services; you want the flexibility to change compute services, instance types, OSs, or regions.
- you can save up to 72% off on-demand prices; you are not making a commitment to a Dedicated host, just compute usage; Saving can be shared across various compute services like EC2, Fargate, and Lambda; this does not provide a capacity reservation.
Elastic Load Balancing:
automatically distributes your incoming application traffic across multiple EC2 instances. “The door greeter standing at the door, directing traffic”
Different types: (classic load balancers - deprecated); application load balancers; gateway load balancers; network load balancers.
EC2 Auto Scaling
Uses horizontal scaling (or scaling out) - could go from 2 server instances to 3, or 3 down to 1 based on need. Auto (horizontal) scaling is very important because it reduces the impact of system failures and improves availability of your applications.
Vertical scaling
“upgrading” (or scaling up), which upgrades and EC2 instance by adding more compute power (CPU, RAM) to an existing server.
AWS Lambda is a:
serverless compute service that lets you run code without managing servers.
You author code in Lambda by
functions, using many popular programming languages (The code you write is called a function)
Lambda _____’s automatically
Scales