AWS (EC2 / S3 / CloudFront / Lambda)
Amazon Web Services (AWS) is Amazon's cloud computing platform. EC2 provides virtual servers, S3 stores files, CloudFront is a CDN, and Lambda runs code without provisioning servers.
§ 1 Definition
AWS is the world's largest public cloud platform, offering over 200 services across compute, storage, databases, networking, machine learning, and more. Four foundational services dominate most web infrastructure: EC2 (Elastic Compute Cloud) gives you virtual servers you can configure and scale. S3 (Simple Storage Service) stores and retrieves any amount of data with 99.999999999% durability. CloudFront is a global CDN that speeds up content delivery. Lambda runs code in response to events without you provisioning or managing servers (serverless). Together these services can power anything from a static marketing site to a global ecommerce platform.
§ 2 EC2: Virtual Servers on Demand
EC2 lets you launch virtual servers in minutes. You choose the CPU, memory, storage, and operating system. Instances scale vertically (bigger machine) or horizontally (more machines). You pay per second of compute time. Common uses include running web servers, application servers, and databases. EC2 is the most flexible compute option on AWS, but it requires you to manage the operating system, patches, and scaling.
§ 3 S3: Unlimited Object Storage
S3 stores data as objects in buckets. It handles images, videos, backups, logs, static website files, and application data. Every object gets a unique URL, making S3 a natural place to store media files served through a CDN. S3's durability guarantee (11 nines) means your data survives even if an entire AWS data center fails. Versioning, encryption, and lifecycle policies come built in.
§ 4 CloudFront: Global Content Delivery
CloudFront distributes your content through a global network of edge locations. When a user requests a file, CloudFront serves it from the nearest edge location rather than your origin server. This dramatically reduces latency. CloudFront works with S3, EC2, or any custom origin. It also provides DDoS protection through AWS Shield.
§ 5 Lambda: Serverless Compute
Lambda runs your code in response to triggers like HTTP requests, file uploads to S3, or database changes. You upload your code and Lambda handles everything else: provisioning, scaling, patching. You pay only for the compute time your code uses (measured in milliseconds). Lambda is ideal for APIs, image processing, scheduled tasks, and event-driven workflows. The tradeoff is potential Cold Start latency when a function hasn't been invoked recently.
§ 6 Note
§ 7 In code
```python
# AWS Lambda function: Resize image on S3 upload
import boto3
from PIL import Image
import io
def lambda_handler(event, context):
s3 = boto3.client('s3')
bucket = event['Records'][0]['s3']['bucket']['name']
key = event['Records'][0]['s3']['object']['key']
# Download, resize, re-upload
response = s3.get_object(Bucket=bucket, Key=key)
img = Image.open(response['Body'])
img.thumbnail((300, 300))
buffer = io.BytesIO()
img.save(buffer, 'JPEG')
s3.put_object(Bucket=bucket, Key=f'thumb/{key}', Body=buffer.getvalue())
return {'statusCode': 200}
```§ 8 Common questions
- Q. Is AWS just for large enterprises?
- A. No. AWS is used by startups, small businesses, and even single-developer projects. The free tier gives you 750 hours of EC2 per month for the first year.
- Q. Which AWS service should I use for a simple website?
- A. For a static site, use S3 + CloudFront. For a WordPress or dynamic site, use EC2 or Lightsail. For a serverless API, use Lambda + API Gateway.
- EC2 provides virtual servers. S3 stores files. CloudFront is the CDN. Lambda runs serverless code.
- AWS offers unmatched scale and flexibility but requires significant expertise to manage cost and complexity.
- The free tier is generous enough to learn and prototype without spending money.
- S3's 11 nines of durability is the industry gold standard for data storage.
We design and manage AWS environments for clients who need the power of the cloud without the complexity. From S3 static sites to Lambda-powered applications, we handle the architecture. Get in touch.
Get in touchAmazon Web Services (AWS) is Amazon's cloud computing platform. EC2 provides virtual servers, S3 stores files, CloudFront is a CDN, and Lambda runs code without provisioning servers.
Category: Infrastructure
Author: Atomic Glue Editorial Team
## Definition
AWS is the world's largest public cloud platform, offering over 200 services across compute, storage, databases, networking, machine learning, and more. Four foundational services dominate most web infrastructure: **EC2 (Elastic Compute Cloud)** gives you virtual servers you can configure and scale. **S3 (Simple Storage Service)** stores and retrieves any amount of data with 99.999999999% durability. **CloudFront** is a global [CDN](/glossary/content-delivery-network-cdn) that speeds up content delivery. **Lambda** runs code in response to events without you provisioning or managing servers (serverless). Together these services can power anything from a static marketing site to a global ecommerce platform.
## EC2: Virtual Servers on Demand
EC2 lets you launch virtual servers in minutes. You choose the CPU, memory, storage, and operating system. Instances scale vertically (bigger machine) or horizontally (more machines). You pay per second of compute time. Common uses include running web servers, application servers, and databases. EC2 is the most flexible compute option on AWS, but it requires you to manage the operating system, patches, and scaling.
## S3: Unlimited Object Storage
S3 stores data as objects in buckets. It handles images, videos, backups, logs, static website files, and application data. Every object gets a unique URL, making S3 a natural place to store media files served through a CDN. S3's durability guarantee (11 nines) means your data survives even if an entire AWS data center fails. Versioning, encryption, and lifecycle policies come built in.
## CloudFront: Global Content Delivery
CloudFront distributes your content through a global network of edge locations. When a user requests a file, CloudFront serves it from the nearest edge location rather than your origin server. This dramatically reduces latency. CloudFront works with S3, EC2, or any custom origin. It also provides DDoS protection through AWS Shield.
## Lambda: Serverless Compute
Lambda runs your code in response to triggers like HTTP requests, file uploads to S3, or database changes. You upload your code and Lambda handles everything else: provisioning, scaling, patching. You pay only for the compute time your code uses (measured in milliseconds). Lambda is ideal for APIs, image processing, scheduled tasks, and event-driven workflows. The tradeoff is potential [Cold Start](/glossary/cold-start-serverless) latency when a function hasn't been invoked recently.
## Note
AWS pricing is complex. Use the AWS Pricing Calculator to estimate costs before provisioning resources. Unmonitored resources are the main source of billing surprises.
## In code
## Common questions Q: Is AWS just for large enterprises? A: No. AWS is used by startups, small businesses, and even single-developer projects. The free tier gives you 750 hours of EC2 per month for the first year. Q: Which AWS service should I use for a simple website? A: For a static site, use S3 + CloudFront. For a WordPress or dynamic site, use EC2 or Lightsail. For a serverless API, use Lambda + API Gateway.
## Key takeaways
- EC2 provides virtual servers. S3 stores files. CloudFront is the CDN. Lambda runs serverless code.
- AWS offers unmatched scale and flexibility but requires significant expertise to manage cost and complexity.
- The free tier is generous enough to learn and prototype without spending money.
- S3's 11 nines of durability is the industry gold standard for data storage.
## Related entries
- [Cloud Hosting](atomicglue.co/glossary/cloud-hosting)
- [Cold Start](atomicglue.co/glossary/cold-start-serverless)
- [Edge Computing](atomicglue.co/glossary/edge-computing)
- [CI/CD (GitHub Actions)](atomicglue.co/glossary/ci-cd-github-actions)
Last updated July 2026. Permalink: atomicglue.co/glossary/aws-ec2-s3-cloudfront-lambda