Kubernetes and AWS Lambda can 

play nicely together
Edward Wilde Core Contributor, Architect Form3
Serverless Practitioners Summit - 2019
• Extending OpenFaaS
• Integrating with AWS Lambda 🤨
• Combining Kubernetes with Lambda 🖖
The Session
Tweet @ewilde 🤳 📸
Top OpenFaaS providers
faas-netes
faas-nomad
faas-swarm
faas-fargate
🥇
available on GitHub
Provider model
Provider model
Provider model
faas-lambda architecture
faas-lambda architecture
faas-lambda architecture
🔐 k8s secrets

for AWS creds
faas-lambda architecture
🔐 k8s secrets

for AWS creds
🔐 

iam roles
Example deployment handler
Why use OpenFaaS on Lambda?
• Migration path to k8s and multi-cloud
• Legacy integration with proprietary services
• Managed infrastructure
• Bursting / Free tier
Benefits of OpenFaaS on Kubernetes
• Portability
• Control over timeouts / scaling
• Memory, CPU and networking
• Ecosystem benefits
How does deployment work?
How does deployment work?
Download images
How does deployment work?
Download images
Extract layers
How does deployment work?
Download images
Extract layers
Create shim 🛠
How does deployment work?
Download images
Extract layers
Create shim 🛠
Repackage. 🗜
How does invoke work?
How does invoke work?
🔨 /Invoke
Python shim
Python shim
Python shim
• List
• List
• List
• List
Node shim
• List
• List
• List
• List
Node shim
• List
• List
• List
• List
Node shim
Golang shim
• List
• List
• List
• List
Golang shim
• List
• List
• List
• List
Demo - deploying to lambda
Demo - deploying to lambda
🔐 

iam roles
Demo Time - faas-lambda with OpenFaaS
What you saw
• Deploying functions in containers
• Execution runtime on lambda
• Slow crypto 🐌 + 🔐 (4 - 9s)
Platform comparison
OpenFaaS on k8s Lambda
Memory 12 TiB*1 3GiB
CPU 96cores*1 / GPU/ FGPA 2cores?
Timeout 290 years + 30s API / 15m
Code limits ∞ 50 MB
/tmp ∞ 512 MB
Minimum replicas ✅ ❌
Zero-scale ✅ ✅
Ease of Use ✅✅✅✅ ✅✅✅
*1 current largest cloud instance I could find
faas-federation architecture - runtime split
faas-federation architecture - runtime split
faas-federation architecture - geo split
faas-federation
• Single control plane
• Multiple execution runtimes
• Geo-location split
• Split deployment based on ‘platform name’
• Later on? CPU/Memory/Capacity
Demo 2 - faas-federation with OpenFaaS
Demo 2 - faas-federation with OpenFaaS
/cert-sign
Step 1
Demo 2 - faas-federation with OpenFaaS
/cert-sign
Step 1
Demo 2 - faas-federation with OpenFaaS
/cert-sign
Step 1
Demo 2 - faas-federation with OpenFaaS
/cert-sign
Step 1
Demo 2 - faas-federation with OpenFaaS
/cert-sign
Step 1
Demo 2 - faas-federation with OpenFaaS
Demo 2 - faas-federation with OpenFaaS
/cert-info
Step 2
Demo 2 - faas-federation with OpenFaaS
/cert-info
Step 2
Demo 2 - faas-federation with OpenFaaS
/cert-info
Step 2
Demo 2 - faas-federation with OpenFaaS
/cert-info
Step 2
Demo 2 - faas-federation with OpenFaaS
/cert-info
Step 2
Demo Time - faas-federation with OpenFaaS
Summing up
• Multiple
• providers
• regions
• Same developer experience
• Three new OSS projects
• Lots of potential
🧮
What’s next?
• Open-source faas-lambda
• Increase template support
• Going to production
Thank You!
www.openfaas.com @ewilde
1. Join Slack 👌
https://docs.openfaas.com/community
2. Try the self-paced workshop! 💻
https://github.com/openfaas/workshop
3. Meet up with the OpenFaaS team here at KubeCon
https://www.openfaas.com/blog/meet-us-at-barcelona/
Get involved

Kubernetes and AWS Lambda can 
play nicely together