Serverless is new trend in software development. It’s confusing many developers around the world. In this talk I’ll explain how to build not only crop images or select data from DynamoDB, but build real application, what kind of troubles are we should expect, how to make decision is your task fit into serverless architecture in Python or may be you should use, general approach. How fast serverless applications and more important how to scale it.
2. • Gopher by night and Python dev by day
• Speaker at many conferences and open source
contributor github.com/andriisoldatenko
• blogger at https://asoldatenko.com
grep andrii /etc/passwd
9. …in the next few years we’re going to
see the first billion-dollar startup with a
single employee, the founder, and that
engineer will be using serverless
technology.
James Governor
Analyst & Co-founder at RedMonk
@a_soldatenkohttps://asoldatenko.com/
37. Chalice deploy
chalice deploy
Updating IAM policy.
Updating lambda function...
...
...
API Gateway rest API already found.
Deploying to: dev
https://8rxbsnge8d.execute-api.us-
west-2.amazonaws.com/dev/
@a_soldatenko
38. Try our books API
curl -X GET https://8rxbsnge8d.execute-api.us-
west-2.amazonaws.com/dev/books
{"hello": "from python library"}%
curl -X GET https://8rxbsnge8d.execute-api.us-
west-2.amazonaws.com/dev/books/15
{"message": "Book 15"}%
curl -X DELETE https://8rxbsnge8d.execute-api.us-
west-2.amazonaws.com/dev/books/15
{"message": "Book 15 has been deleted"}%
@a_soldatenko
53. AWS lambda and
Python 3
@a_soldatenko
import os
def lambda_handler(event, context):
txt = open('/etc/issue')
print txt.read()
return {'message': txt.read()}
Amazon Linux AMI release 2016.03
Kernel r on an m
54. AWS lambda and
Python 3
@a_soldatenko
Linux ip-10-11-15-179 4.4.51-40.60.amzn1.x86_64 #1 SMP
Wed Mar 29 19:17:24 UTC 2017 x86_64 x86_64 x86_64 GNU/
Linux
import subprocess
def lambda_handler(event, context):
args = ('uname', '-a')
popen = subprocess.Popen(args,
stdout=subprocess.PIPE)
popen.wait()
output = popen.stdout.read()
print(output)
61. Future of serverless
@a_soldatenko
The biggest problem with Serverless FaaS right now is tooling. Deployment /
application bundling, configuration, monitoring / logging, and debugging all need
serious work.
https://github.com/awslabs/serverless-
application-model/blob/master/HOWTO.md
73. What about
websockets?
A: 2 years later and nothing yet on this?
https://forums.aws.amazon.com/thread.jspa?threadID=205761
74. AWS IoT Now Supports
WebSockets
http://stesie.github.io/2016/04/aws-iot-pubsub
75. Serverless are the
new NoSQL 🎉💩
- everybody claims it's the next big thing
- a few people have actually worked with the technology
- and in the end it's just a crippled (one-way) database