AWS free tier overview - Time & Space Complexity
Start learning this pattern below
Jump into concepts and practice - no test required
We want to understand how the number of AWS operations grows when using the free tier services.
Specifically, how does usage scale as you add more resources or requests?
Analyze the time complexity of launching multiple EC2 instances under the free tier limits.
// Launch multiple EC2 instances
for (let i = 0; i < n; i++) {
aws.ec2.runInstances({
ImageId: 'ami-0abcdef1234567890',
InstanceType: 't2.micro',
MinCount: 1,
MaxCount: 1
});
}
This sequence launches n EC2 instances one by one within free tier limits.
Here are the repeating actions:
- Primary operation: The API call to launch one EC2 instance (runInstances).
- How many times: This call happens once per instance, so n times.
Each new instance requires one API call, so the total calls grow directly with the number of instances.
| Input Size (n) | Approx. API Calls/Operations |
|---|---|
| 10 | 10 |
| 100 | 100 |
| 1000 | 1000 |
Pattern observation: The number of API calls increases evenly as you add more instances.
Time Complexity: O(n)
This means the time or effort grows directly in proportion to how many instances you launch.
[X] Wrong: "Launching multiple instances is just one API call regardless of number."
[OK] Correct: Each instance requires its own API call, so the total calls add up with more instances.
Understanding how AWS API calls scale helps you design efficient cloud solutions and shows you can think about resource costs clearly.
"What if we launched multiple instances in a single API call using MaxCount > 1? How would the time complexity change?"
Practice
Solution
Step 1: Understand AWS Free Tier purpose
The AWS Free Tier is designed to help new users explore AWS services without immediate cost.Step 2: Compare options with this purpose
Only To let users try AWS services without paying initially correctly states this purpose; others describe incorrect or exaggerated features.Final Answer:
To let users try AWS services without paying initially -> Option DQuick Check:
AWS Free Tier = Try services free initially [OK]
- Thinking Free Tier offers unlimited free usage
- Believing Free Tier is only for big companies
- Confusing Free Tier with permanent free accounts
Solution
Step 1: Recall AWS Free Tier typical offers
A common Free Tier offer is 750 hours per month of EC2 t2.micro instance for 12 months.Step 2: Check each option against known offers
750 hours of Amazon EC2 t2.micro instance usage per month for 12 months matches this. Options B, C, and D incorrectly state unlimited or forever free usage which is not true.Final Answer:
750 hours of Amazon EC2 t2.micro instance usage per month for 12 months -> Option BQuick Check:
EC2 Free Tier = 750 hours/month for 12 months [OK]
- Assuming Free Tier offers unlimited or forever free usage
- Confusing daily limits with monthly limits
- Ignoring the 12-month time limit on some offers
Solution
Step 1: Understand Free Tier usage limits
The Free Tier allows 750 hours per month of EC2 t2.micro usage free.Step 2: Calculate excess usage charges
Using 800 hours means 50 hours exceed the free limit, so you pay for those 50 hours.Final Answer:
You are charged for 50 hours of usage -> Option CQuick Check:
Usage > 750 hours = pay excess hours [OK]
- Thinking Free Tier stops instances automatically
- Believing no charges occur after limit
- Assuming unlimited free usage
Solution
Step 1: Recall Free Tier time limits
Most Free Tier offers last for 12 months after account creation.Step 2: Determine status after 13 months
After 13 months, the 12-month Free Tier benefits expire, so you no longer get those free offers.Final Answer:
You no longer get the 12-month Free Tier benefits -> Option AQuick Check:
Free Tier 12 months expired = no more free benefits [OK]
- Thinking Free Tier lasts forever
- Assuming account closes automatically
- Believing unlimited free usage continues
Solution
Step 1: Identify serverless computing service
Amazon Lambda is AWS's serverless compute service.Step 2: Check Free Tier limits for Lambda
Lambda offers 1 million free requests per month under Free Tier, ideal for learning serverless.Step 3: Compare other options
EC2 is not serverless, S3 storage is not unlimited, and RDS multi-AZ is not free.Final Answer:
Amazon Lambda with 1 million free requests per month -> Option AQuick Check:
Serverless = Lambda 1M free requests [OK]
- Confusing EC2 with serverless
- Assuming unlimited free storage on S3
- Thinking RDS multi-AZ is free
