Quiz
Warm-up: an EC2 instance from lesson 3-1 and a Lambda function from lesson 7-1 both sit completely idle for a month. Who pays what?
Everything is one of four meters
AWS has hundreds of services but essentially four meters. For any service, ask which of these it spins:
- Compute time: instance-hours (EC2, RDS) or gigabyte-seconds of function runtime (Lambda).
- Storage: GB-months held — S3, instance disks, backups. An EC2 instance's disk is a separate service, EBS (Elastic Block Store): network-attached storage volumes billed per GB-month whether the instance is busy or not.
- Requests: per-operation charges, tiny but multiplied by millions (S3 requests, Lambda invocations).
- Data transfer OUT: bytes leaving AWS to the internet, about $0.09/GB.
Memorize the asymmetries: data IN is free, data OUT costs. Storage is cheap, compute is not. The meter you forget, and the one that has surprised a generation of engineers, is number 4: serve a 1 GB video to 10,000 viewers and the bandwidth alone is about $900, more than every server involved.
Code exercise · bash
Estimate like an engineer: rate × time, in integer math. We track money in hundredths of a cent so nothing rounds away. A t3.micro costs $0.0104/hour (rate 104) and a month averages 730 hours. Run the estimate.
Code exercise · bash
Your turn. The instance also needs a disk: an 8 GB EBS volume of the default **gp3** type (gp3 is EBS's current general-purpose SSD class; older volumes use gp2) at $0.08 per GB-month, rate 800 in our units. Add the EBS line and a total, matching the expected output format exactly.
Quiz
A photo-sharing app stores 100 GB in S3 (~$2.30/month) but serves 2 TB of images to users monthly. Which meter dominates the bill?