AWS serverless from the trenches
What is serverless?
- AWS Lambda
- Azure Cloud functions
- IBM OpenWhisk
- Google Cloud functions
Think of it as: Managed code environment in the cloud.
Microservices and the Unix philosophy?
- Do One Thing and Do It Well
- SNS events are the pipes on steroids!
find | grep foobar | mail firstname.lastname@example.org
sls invoke -f filtermail -p events/s3-event.json
sls invoke -f filter -p events/s3-event.json
sls invoke -f mail -p events/mail-me.json
s3-event.json is the saved copy of `sns: "arn:aws:sns:ap-southeast-1:XXXXXXXXXXX:interesting-upload"`
Problem: New Ingestion flow for Spuul
- Co-ordinate from AWS S3
- Co-ordinate with remote services / Web hooks
- Try out DynamoDB
Now we have ~10 lambda functions.
TIP: It probably be should be all in one
The good things
Not so good things
- Permissions aren't the same as local invocation
- Setting up a policy is still a bit painful
- Limited by CloudFormation (multi-tenant is really quite hard)
- S3 bucket pollution
- YAML formatting
AWS JS SDK
Really quite bad things
- Keep things out of your handler!
- No debugger
- Tooling has issues like slow logging and deployment (probably need to CI)
- Drilling into errors is hard
- node_modules/ visibility
Will AWS solve this problem?
Third parties like Dashbird.io
Use the left and right arrow keys or click the left and right
edges of the page to navigate between slides.
(Press 'H' or navigate to hide this message.)