AWS Builder Center
Serverless Isn't "No Servers." It's "Not My Servers."

Serverless Isn't "No Servers." It's "Not My Servers."

API Gateway, Lambda, DynamoDB, and the mindset shift that actually matters.

From 'how do I code this?' to 'what if a million users hit it?' šŸ˜‚ā€” led me to backend, AWS, and DB.

The lie in the name

Yes, there are servers. Plenty. You just don't babysit them.
Traditional: you own the servers, the OS, patching, scaling, capacity planning.
Lambda: you own the function code and its config. AWS owns everything underneath.
That's the whole deal. Everything else is consequences.

The smallest useful setup

Client → API Gateway → Lambda → DynamoDB / S3
API Gateway takes the HTTPS request, Lambda runs your logic, DynamoDB holds the state. It's also the standard pattern in AWS's own serverless docs, so you're not doing anything exotic.
A Ā POST /investigationsĀ  request looks like this: validate → run logic → write to DynamoDB → return. The caller waits the whole time. Fine for CRUD. Not fine for anything slow.

Lambda is not a tiny server

The first mistake everyone makes: stuffing the whole app into one function.
āŒ One Giant Lambda: auth + users + payments + reports + everything

āœ… /users → User Lambda
/payments → Payment Lambda
/reports → Report Lambda
/jobs → Worker Lambda
One function, one job. If you're building an app server inside a function, you've just rented a worse server.

Sync vs async (the decision that matters most)

Sync: caller waits. Good for quick stuff.
Async: caller gets a Ā jobIdĀ  back immediately, and a worker does the slow thing in the background.
Browser → API Gateway → API Lambda → writes job (status=queued) → returns jobId
↓
Worker Lambda → does the long work → updates DynamoDB
I used this shape for an investigation-style workload. The API Lambda never runs the actual investigation. It just queues it and gets out of the way. The client polls the status and moves on with its life.

Events are the real superpower

Lambda gets fun when events become the seams between your components:
S3 upload → Lambda → process file
Or Lambda consuming from SQS or DynamoDB Streams. Stop asking "where's my server?" and start asking:
What happened? What needs to run? What state needs saving?
Event → function → state → next event. That's the mental model.

The trade-offs nobody puts on the landing page

  • Cold starts: a fresh environment needs a moment to spin up.
  • Stateless: never treat the execution environment as storage.
  • Time limits: long jobs need an async design.
  • Debugging: one request can hop through five services. Good luck without tracing.
  • Lock-in: the more managed services you glue together, the more AWS-shaped you get.
Serverless doesn't remove problems. It moves them.

Habits that save you later

Init clients outside the handler so warm invocations reuse them:
python
import boto3

dynamodb = boto3.resource("dynamodb") # created once, reused

def lambda_handler(event, context):
table = dynamodb.Table("Investigations")
...
Make everything idempotent. Events can be delivered twice. Your system shouldn't care.
Watch for recursive loops. S3 → Lambda → S3 → Lambda → your bill. AWS warns about this for a reason.
Log structured JSON, not vibes.
json
{
"requestId": "abc-123",
"function": "investigationWorker",
"stage": "verifyingEvidence",
"durationMs": 842,
"status": "failed"
}
Ā ERROR something failedĀ  tells you nothing. This tells you which invocation, which stage, how long, and whether it's a one-off or systemic.
Least privilege, per function. API Lambda gets DynamoDB read/write. Worker gets S3 and Bedrock. Nobody gets Ā AdministratorAccessĀ  because "it's easier for now." Each function is its own security boundary, so treat it like one.

About the bill

Pay-per-execution is great for spiky or unpredictable traffic. But chatty functions, pointless invocations, and heavy data transfer will still burn money. Serverless is cheap when the design is good, not automatically.

Takeaway

Serverless isn't about deleting servers from the diagram. It's about moving the boundary from managing infrastructure to events, functions, and explicit state.
Don't lift your old server architecture into Lambda. Design for serverless from day one.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article