Things you need to
know to become a
Serverless API Ninja
Allan A. Chua
API Days Singapore 2020
Slide 2
Slide 2 text
Writing a Book
about Serverless
Allan Chua
Solutions & Integrations
Architect @ FWD
AWS Certified
Solution Architect
Years of Experience
with Serverless
1.5
Slide 3
Slide 3 text
BASICS INTEGRATIONS CAUTION
Slide 4
Slide 4 text
Serverless Means
Efficiency
Slide 5
Slide 5 text
No Servers to
Manage
Pay only for what is
used
Reduced Security
Risk & Cost
Slide 6
Slide 6 text
Built-in High Availability &
Disaster Recovery
Availability Zone A Availability Zone B Availability Zone C
Slide 7
Slide 7 text
What traditional architectures will cost you per API Cluster
1 EC2 t2.xlarge
$0.185 / Hour
2 EC2 t2.xlarge
$0.370 / Hour
High Availability
$135.05 $ 270.10
Slide 8
Slide 8 text
96K API calls worth 91 Hours of actual runtime
for 71 CF Stacks in DEV environment for FREE
Slide 9
Slide 9 text
6.6 Million Queue Messages for 2$
In DEV Environment
Slide 10
Slide 10 text
We drove the cost of dev environments
$270.10 per cluster x 71
$ 19,710 $ 0
Lambda based architecture
Traditional Architecture
Slide 11
Slide 11 text
Working with AWS Lambda
is way more convenient with
AUTOMATION
Slide 12
Slide 12 text
Reliable &
Repeatable
Builds
Reduced
Human Errors
Maintainability
Benefits of Automation in
API Development
Protects businesses
from developer
turnover
Integrating vs Infusing
Artificial Intelligence in
your APIS
Slide 37
Slide 37 text
Digital Transformation have recently
gained tons of traction and AI is riding
this wave
Slide 38
Slide 38 text
Lucky for us, we can either infuse or
integrate AI Models to Lambda APIs
Integrating with
AI APIs
Infusing AI to
your APIs
Slide 39
Slide 39 text
Integration with a base
API powered by AI
Slide 40
Slide 40 text
Blog used for integrating Google
Cloud Vision using NodeJS and
Lambda by Alex DeBrie
https://www.serverless.com/blog/goog
le-cloud-functions-application
Slide 41
Slide 41 text
Infusing / Packaging
Custom Built AI Models to
your APIs
Slide 42
Slide 42 text
An unorthodox approach on how can you achieve high
accuracy ML is by combining multiple models in an
election system inside the API
Slide 43
Slide 43 text
How to embed Scikit Learn Models
inside Lambda Functions by Will
High
https://www.highonscience.com/blog/2
017/09/29/ml-scoring-service-on-aws-
lambda/
Slide 44
Slide 44 text
Integrating RPA
in your Serverless APIS
Slide 45
Slide 45 text
RPA is a huge advantage in the Insurtech
World.
Manual Process
Automation
Data Scraping &
Market Intelligence
Integration with
Legacy Systems
Slide 46
Slide 46 text
Typical Severless RPA Integration
Slide 47
Slide 47 text
Asynchronous API triggering
RPA worker using AWS
Lambda
https://bit.ly/3kW9sTM
Slide 48
Slide 48 text
Serverless have
Limitations
Slide 49
Slide 49 text
Its rewarding to be
mindful about serverless
limitations when
proposing to your boss
Slide 50
Slide 50 text
Memory Limitation Max Execution Time
Invocation Payload
Max Resource per Cloud
Formation Stack
API Gateway Max
REST Timeout
3 GB 6 MB 15 Mins
200 30 Secs
Slide 51
Slide 51 text
Wrestling with
Coldstart
Slide 52
Slide 52 text
Common Causes of Coldstart
Poor Choice of Language Too much code
Heavy Dependencies VPC Integration
VPC
Slide 53
Slide 53 text
Coldstart Busters
Use Lamba Layers Minimize VPC Keep Warm
Pick GO, JS and Python
VPC
Slide 54
Slide 54 text
Serverless is
NOT for everything
Slide 55
Slide 55 text
It can be rewarding to utilize Docker
and K8s on certain cases
B2B Services On-Premise
State Law vs Foreign
Data Storage
Slide 56
Slide 56 text
Questions & Answers Section
Slide 57
Slide 57 text
Credits to the following:
- Joel Khoo (Ninja Captain)
- Michel Do (Chatbot Master)
- Nattavit Kamoltham (CI/CD & AI)
- Jon Scheele for the invite
Slide 58
Slide 58 text
Searching Serverless Codebase is easier with Quod AI