Do we need a serverless
framework?
With Python, I did not
Serverless
Promises
● Cost reduction
● Flexibility
● Streamlined operations
@xtblg
Wait
Confusion in the land of the Serverless - Sam Newman - goto 2017
But
Designing for the serverless age - Gojko Adzic - goto 2017
Serverless: a computing model where a cloud
platform executes user-provided functions in
response to events at any scale. See FaaS.
result = f(event, ...)
Complexity
Provider
independence
cljs-lambda
Serverless
Claudia.js
Apex
Operational tooling (deploy, test, etc)
Very lightweight abstraction on top of events (claudia.js)
IaC tools
Claudia.js abstraction
Entities
Use cases
Controllers
External Interfaces
Dependencies
Web / UI
Frameworks
DB Drivers
Translation between
external and domain
concepts
Application
business rules
Domain business
rules
Ports
Adapters
function
Serverless
infra
Handler Use case Entity Repository DB Driver
handle
do
new
save
put
End-to-end test
Unit test Unit testUnit test Component test
__call__ magic method
Dependency Injection Container
Routing
Results encoding
Other potential decorators
● Simple argument validation (schema)
● Content negotiation
● Authentication
● ...
Result
Returns dict shaped as an AWS
lambda response
Deploying
Packaging
Zappa: WSGI-Lambda adapter
What I have learnt
1. No such a thing as provider independence with FaaS.
2. There are already really good tools to manage IaaC.
3. … and deployments.
4. Good architecture and test-first are simpler.
5. Python is really well suited to be used as the runtime.
6. Zappa is a special case.
Questions?

Do we need a serverless framework? With Python, I did not