Compute
Amazon EC2
On-demand, scalable compute capacity in the form of virtual servers (instances), whose instance type determines the combination of CPU, memory, networking, and storage. It lets you launch as many servers as you need, configure their networking and security, and scale capacity up or down with the load.
Exam phrases that point here
«the workload tolerates interruptions and the goal is the lowest possible cost»
Spot Instances use spare EC2 capacity at a steep discount compared with On-Demand, in exchange for AWS being able to reclaim them with advance notice. They fit fault-tolerant or resumable workloads.
When not: If the workload cannot be interrupted (a production database, an application with state on the instance), Spot is not the answer: think of On-Demand or, if usage is steady, Savings Plans or Reserved Instances.
«steady, predictable usage for one or three years, at the lowest cost»
Savings Plans and Reserved Instances give a discount in exchange for a 1- or 3-year commitment: Savings Plans commit to an hourly spend, while Reserved Instances commit to an instance configuration.
When not: If the scenario also requires guaranteed capacity in an Availability Zone, Savings Plans do not reserve it: you need a zonal Reserved Instance or an On-Demand Capacity Reservation. If the workload is short-lived or unpredictable, On-Demand.
«reuse existing per-socket or per-core software licenses»
Dedicated Hosts give you an entire physical server for your instances, which lets you use server-bound licenses.
When not: If the requirement is only compliance (hardware that is not shared with other customers) with no need to control the physical server for licensing, Dedicated Instances also fit.
«the lowest possible network latency between the instances of an HPC cluster»
A cluster placement group launches instances close together so they communicate with low latency; with Elastic Fabric Adapter (EFA), tightly coupled HPC applications gain even more.
When not: If the priority is that a hardware failure does not take down several instances at once, the goal is to spread them out (spread placement group, multiple Availability Zones), not to put them close together.
«the application takes a long time to start and must come back quickly with its in-memory state preserved»
When an instance hibernates, the contents of RAM are saved to the EBS root volume and restored when it starts again, so the application resumes where it left off.
When not: Hibernation must be enabled when the instance is launched and requires an encrypted EBS root volume. If the goal is for data to survive instance termination, the solution is to store it in EBS, EFS, or S3, not to hibernate.
«applications on EC2 must access Amazon S3 without storing access keys on the instance»
An IAM role attached to the instance (through an instance profile) delivers temporary credentials to the application, and they are renewed automatically.
When not: If the caller is not an instance but end users of a mobile or web application, think of Amazon Cognito; and if the problem is storing database passwords, think of AWS Secrets Manager.
Often paired with
- Amazon EBS
- Elastic Load Balancing (ELB)
- Amazon EC2 Auto Scaling