Two services do two jobs. Mix them up and “serverless” sounds like marketing. Keep them straight and the rest of this post is obvious.
S3 is object storage. You put files in a bucket: index.html, JavaScript, images. The bucket lives in one AWS region. There is no Linux box for you to patch. There is a disk API. The Vue dist folder from npm run build goes here. In Part 1 this is the origin for the front end.

You can host a static site from S3 alone. The objects still sit in that region. S3 does not, by itself, keep copies next to every user. Custom HTTPS and “keep the bucket private, open only the front door” usually belong to the next layer.
CloudFront is a CDN. It has edge locations (POPs) around the world. The browser does not connect to the bucket’s region first. It connects to a nearby edge. CloudFront does not replace S3. It stands in front of S3 and serves the same objects from cache.

Every request follows this order:
- Browser → CloudFront
- Hit: the edge already has the file. S3 is not called.
- Miss: CloudFront GETs the object from S3, stores it at the edge, then returns it.

You upload to S3. People open the CloudFront URL, or a domain on that distribution. The browser does not talk to S3 first. Part 2 splits cache for index.html versus hashed /assets/* on CloudFront. The origin is still S3.
Serverless is not one product. The operations test is: do you run an operating system? You do not, on S3 or on CloudFront. That is why this Vue front is called serverless in production. Lambda is the usual serverless compute: run code per event, no AMI. You accept cold starts, a timeout, and no local disk as a database.
Also commonly grouped as serverless: API Gateway, DynamoDB, SQS/SNS/EventBridge, Fargate. Fargate can still run tasks all day. “No server for you” is not “zero cost at idle.”
Map Part 1:
| Piece | What it is | Serverless? |
|---|---|---|
| Vue static files | S3 origin, CloudFront in front | Yes |
| Spring Boot | A process you keep on EC2 | No |
| This blog | Lightsail WordPress | No — a VPS |
A hybrid is normal. Static files: browser → CloudFront. API: browser → EC2. A load balancer does not make EC2 serverless. The OS is still yours. If you move the API later, Lambda + API Gateway is the usual path. Long-running work still fits EC2.






Leave a Reply