EC2 Pricing Models, Storage Options and Images: On-Demand, Savings Plans, Spot, EBS, Instance Store and AMIs
EC2 Purchasing Options
| Option | How it works | Best for | Discount |
|---|---|---|---|
| On-Demand | Pay per second. No commitment | New, short or unpredictable workloads, learning | None (baseline price) |
| Savings Plans | Commit to a dollar amount per hour for 1 or 3 years | Steady usage that may change instance types. Compute Savings Plans also cover Fargate and Lambda | Up to about 66-72 percent |
| Reserved Instances (RIs) | Commit to specific instance attributes for 1 or 3 years (Standard or Convertible) | Steady, predictable workloads | Up to about 72 percent |
| Spot Instances | Use spare capacity. AWS can take it back with a 2-minute warning | Fault-tolerant jobs: batch, CI, big data | Up to about 90 percent |
| Dedicated Hosts / Instances | A physical server just for you | Licensing rules or compliance | Higher cost |
| Capacity Reservations | Reserve capacity in an AZ | Guaranteed capacity for events | No discount by itself |
Easy memory On-Demand = flexible. Savings Plans / RIs = steady and cheaper. Spot = cheapest but can be interrupted. Dedicated = single-tenant for licensing.
What You Pay For With EC2
- Compute time (per second for Linux, minimum 60 seconds)
- Storage (EBS volumes, snapshots)
- Data transfer out to the internet and between Regions or AZs (data in is free)
- Other: Elastic IPs, load balancers, NAT gateways, licenses
Storage for EC2
| Storage | Type | Survives stop? | Best for |
|---|---|---|---|
| EBS (Elastic Block Store) | Network disk attached to one instance (in the same AZ) | Yes. Persists independently | OS disks, databases, anything you must keep |
| Instance store | Disk physically on the host | No. Lost on stop or terminate | Cache, scratch data, temporary buffers |
| EFS | Shared network file system (NFS) | Yes | Files shared by many Linux servers |
| S3 | Object storage over the API | Yes | Backups, images, logs, static content |
EBS Volume Types in Simple Words
| Type | Meaning | Use |
|---|---|---|
| gp3 | General purpose SSD, good default | Boot disks, most apps |
| io2 / io1 | Provisioned IOPS SSD for very fast, steady I/O | Critical databases |
| st1 | Throughput HDD (cheap, big sequential reads) | Logs, big data |
| sc1 | Cold HDD (cheapest) | Rarely used data |
- An EBS volume lives in one AZ. Attach it to an instance in the same AZ
- You can resize a volume while it is in use, then extend the file system
- Turn on EBS encryption (and encryption by default for the account)
Snapshots: Backups of EBS
bash
aws ec2 create-volume --availability-zone ap-south-1a --size 20 --volume-type gp3
aws ec2 attach-volume --volume-id vol-0abc --instance-id i-0abc --device /dev/sdf
aws ec2 create-snapshot --volume-id vol-0abc --description "before upgrade"
aws ec2 create-volume --snapshot-id snap-0abc --availability-zone ap-south-1b # restore, even in another AZ
aws ec2 copy-snapshot --source-region ap-south-1 --source-snapshot-id snap-0abc --region ap-southeast-1 # to another Regio
- Snapshots are incremental and stored safely in S3 by AWS
- Use Data Lifecycle Manager or AWS Backup to automate daily snapshots and delete old ones
AMIs: Reusable Server Templates
- An AMI contains the OS, software and settings to launch identical servers
- Make your own: set up one server perfectly, then Create image. Launch many servers from it
- AMIs are Regional. Copy them to use in another Region
- Share an AMI with other accounts or keep it private. Build them automatically with EC2 Image Builder
bash
aws ec2 create-image --instance-id i-0abc --name "web-golden-v1" --description "nginx configured"
aws ec2 describe-images --owners self --query 'Images[].[ImageId,Name]' --output table
aws ec2 run-instances --image-id ami-0new --instance-type t3.micro --count 3
Cost Tips for Beginners
- Stop or terminate things you are not using
- Pick the smallest size that works, then grow
- Use Savings Plans only after you know your steady usage
- Use Spot for jobs that can restart
- Delete unattached volumes and old snapshots
- Watch data transfer out and NAT gateway costs
- Use AWS Compute Optimizer and Cost Explorer for advice
Practice
- Create a 20 GiB volume, attach it, format it and mount it
- Take a snapshot, delete the volume and restore it
- Create an AMI from your nginx server and launch a copy
- Compare the On-Demand price of two instance types using the Pricing Calculator
Conclusion
Pay On-Demand to learn, commit with Savings Plans or Reserved Instances for steady use, use Spot for interruptible work, keep important data on EBS (not instance store), back up with snapshots, and build servers from AMIs.
Quick Summary: purchasing options; costs; storage types; EBS; snapshots; AMIs; cost tips.

