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
Lambda allows developers to focus on core business logic for the apps they are developing, instead of:
managing servers - patching, provisioning, scaling, etc.
With Lambda you ___ access servers
Cannot
Lambda can execute your code in response to
events
Lambda Functions have a ____ timeout
15 min
With lambda, you are only responsible for the _____
Code. AWS manages the coding environment and the supported language versions
With Lambda you are charged based on the ____ and ___
compute time duration and number of requests
The Lambda free usage tier includes includes ______
1 million free requests each month
An application in a container will run _____
the same every time, because it is a self-contained unit.
AWS Fargate is a ___ compute engine for _____
Serverless, containers
Fargate allows you to manage ____ similar to ____
Containers, Docker
Fargate ____s automatically and is ___
scales, serverless
Fargate works well with ___ and ___
Amazon Elastic Container Service (ECS) and Amazon Elastic Kubernetes (EKS)
AWS Lightsail is a ___ that manages ___
Virtual Private Server, containers
Lightsail allows you to quickly deploy ____ for small projects
pre-configured applications
Lightsail includes (5 things):
Virtual machine, SSD-based storage, data transfer, DNS service management, and a static IP address
AWS Outposts allows you to run AWS cloud services in your _____
Internal data center
Outposts is an example of a ____ model
Hybrid
Outposts support workloads that need to remain _____ due to _____ or ______
on-premises, latency, data sovereignty needs
With Outposts, AWS actually ____ and ____ ___ in your ____
delivers and installs servers in your internal data center.
- used for a hybrid experience
AWS Batch allows you to:
process large workloads in smaller chunks (or batches)
AWS Batch is a
fully managed batch computing service that plans, schedules, and runs your containerized batch or ML workloads across a full range of AWS compute offerings.
_______ is an event-driven, serverless computing platform that runs code in response to _____ and automatically manages the computing resources required by that code.
AWS Lambda, events