Loading…
While this loads — worth knowing
Redis has data structures — sorted sets, counters, pub/sub. Memcached has plain keys and nothing else.
Loading…
While this loads — worth knowing
Redis has data structures — sorted sets, counters, pub/sub. Memcached has plain keys and nothing else.
Virtual machines you choose, size and run yourself: the most flexible compute on AWS, and the most work.
Where EC2 takes you7 steps, all open
EC2 gives you virtual machines, called instances. You choose the image it boots, an AMI; the instance type, which sets its CPU, memory, storage and network; the subnet it runs in; and where it keeps its data. After that, patching, sizing and scaling are yours.
It is the most flexible compute on AWS, and the most work. Reach for something more managed when you can, and for EC2 when you need what only a whole machine gives you.
You pick a model and what comes with it, and pay by the second while you have it. Commit to a year or three and it costs less. Take a car from the spare pool and it is cheap, but the company can take it back with two minutes' warning. Anything left in the glovebox is gone when the car goes back; your luggage in a locker stays.
AMIInstance typeOn-DemandSavings PlansSpotInstance storeThe load balancer sends requests only to healthy targets. With the default settings it checks each instance every 30 seconds and takes it out of service after two failures in a row, so an instance that dies stops getting traffic within about a minute.
Up: change an instance's type for a bigger one. Out: add more instances behind a load balancer. Out is what survives a failure, and it is what Auto Scaling automates.
The numbers in this simulation are made up to show the shape, not the capacity of any real instance type.
Capacity: 500 requests a second for each.
200 requests a second more than 2 instances can take. Add 1 more, or shed the load.
Both instances in AZ a
CustomersServed by Web 1 and Web 2
Click a node to make it fail. The timings in the log are the real ones, played 10× faster.
One instance in each zone
CustomersServed by Web 1 and Web 2
Click a node to make it fail. The timings in the log are the real ones, played 10× faster.
An instance lives in one Availability Zone. Put both in the same zone and losing it is an outage; spread them and it is lost capacity.
Its instance store is erased when the instance stops, so nothing you cannot lose belongs there. An Elastic IP address can be remapped to a replacement to mask a failure.
If every target fails its health checks at once, an Application Load Balancer sends traffic to all of them anyway, rather than to none.
A role, never keys. An instance gets temporary credentials from its IAM role, through an instance profile, and they are updated automatically. An instance has one role at a time.
Require IMDSv2. The instance metadata service is where those credentials come from. IMDSv2 makes every request start with a session token, which AWS recommends as defence in depth against open firewalls, reverse proxies and SSRF.
Security groups let in only what a rule allows: a new security group allows no inbound traffic at all.
No public address just to log in. EC2 Instance Connect Endpoint connects you to an instance from the internet without the instance having a public IPv4 address.
By the second. Linux, Windows, RHEL and Ubuntu Pro instances are billed per second with a 60-second minimum; SUSE Linux Enterprise Server by the full hour.
Commit for less. Savings Plans commit to a consistent amount of spend per hour for 1 or 3 years, across instance types. Reserved Instances commit to one instance configuration for 1 or 3 years.
Spot uses spare capacity for much less, and can be interrupted with a two-minute warning.
Also on the bill: every public IPv4 address. Instance store is included in the instance's price.
Prices change, so none are printed here. Check the EC2 pricing pages on aws.amazon.com.
| Option | You commit to | Can be interrupted | Choose it when |
|---|---|---|---|
| On-Demand | Nothing; pay by the second | No | Usage is short, spiky or unknown |
| Savings Plans | Spend per hour, for 1 or 3 years | No | Usage is steady, but types and sizes change |
| Reserved Instances | One configuration, for 1 or 3 years | No | The same instance runs all the time |
| Spot Instances | Nothing | Yes, with a 2-minute warning | Work that can stop and restart |
| Dedicated Hosts | A physical server of your own | No | Per-socket or per-core licences, or compliance |
| Capacity Reservations | Capacity in one Availability Zone | No | You must be able to launch at a given moment |
fault-tolerant batch jobs, at the lowest costSpot Instances
The work can restart, so a two-minute interruption notice is acceptable.
steady usage, but the instance families keep changingA Savings Plan
It commits to spend per hour, not to one configuration.
software licensed per socket or per coreDedicated Hosts
A physical server of your own, so existing licences apply.
the lowest latency between the nodes of an HPC jobA cluster placement group
Close together in one Availability Zone, with the highest throughput between them.
a few critical instances must never share hardwareA spread placement group
Each on distinct hardware, up to seven running instances per zone.
HDFS or Cassandra nodes across separate racksA partition placement group
Partitions do not share racks, and the application can see which is where.
the data on the instance store was gone after a stopInstance store is temporary
It survives a reboot, not a stop. Keep data on a persistent volume or in S3.
the public IP changed after the instance was restartedAn Elastic IP address
A public IPv4 address is released on stop; an Elastic IP address stays yours.
A company runs a nightly analytics job on EC2 that takes about four hours. It saves checkpoints, so if it is interrupted it can resume where it stopped. The finance team wants it to cost as little as possible. Which purchasing option should a solutions architect choose?
A vendor's image analysis software installs its own kernel driver, and each job runs for up to six hours. Jobs arrive on a queue, and results are written to S3. What runs the software?
60 s minimum; SUSE Linux by the hour.Next: Auto ScalingKeeps the right number of EC2 instances running. It replaces the ones that fail, and adds or removes instances as the load changes.
Open Auto ScalingEvery fact on this page was checked against AWS’s own documentation on 15 Sept 2026. If AWS has changed something since, its page is the one to trust.