Alexander Zyl
Senior Software Engineer
alex.zyl@outlook.com
https://facebook.com/zyl.alex
‘As-a-Service’
Functions
Application
Runtime
Operating System
Virtualization
Networking
Storage
Hardware
FaaS
Customer Managed
Customer Managed
Unit of Scale
Provider Managed
Functions
Application
Runtime
Operating System
Virtualization
Networking
Storage
Hardware
Functions
Application
Runtime
Operating System
Virtualization
Networking
Storage
Hardware
Functions
Application
Runtime
Operating System
Virtualization
Networking
Storage
Hardware
On Premises IaaS PaaS
Functions
Application
Runtime
Operating System
Virtualization
Networking
Storage
Hardware
SaaS
FaaS benefits
No servers to manage Continuous scalability Cost effectiveness
• Mobile backend
• Serverless websites
• Data processing
• Event processing
• Scheduled tasks
Use cases
Back in 2014
Azure VM (IaaS)
Azure App Service (PaaS)
AWS Elastic Beanstalk (PaaS)
Amazon EC2 (IaaS)
Azure WebJobs
WebJob 3WebJob 2WebJob 1
w3wp (SCM)
ZipZip Zip
App Service
Web App
w3wp (Main App)
Web Application
WebJob 4
Zip
Zero administrative
Autoscaling
Fine-grained pricing
Bring your own code
AWS Lambda
Functions Apps
App Service Eco-System
Azure Functions
What is function?
ConfigurationCodeTrigger Result
• Triggered by event source
• On-Demand
• Scheduled
Function types
Functions: Azure way
Azure
subscription
Functions
app 1
Functions
app N
Func 1
Func 1 Func 2 Func 3 Func 4 Func 5
Configuration
Configuration
Func 2 Func 3
...
Binding: before and after
Azure
Functions
app
Azure Functions host
Code
Dependencies
WebJobs SDK Default assemblies
Function 1 Function 2 Function 3
Demo
User
OCR Service
function
OCR Recognition
Service
Recognized images
container
Email sender
function
Result
message queue
Image
Sends
Stores
TriggersSends
Triggers
User OCR Service
function
Incoming images
container
Task Info table
New task message
queue
Image processing
function
Invokes
Task completion
topic
Email sender
function
SMS sender
function
Triggers
Triggers
Task result
container
New task poison
message queue
Poison message
processing
function
Triggers
OCR Recognition
Service
Event Models: Pull and Push
Pull model:
Push model:
Event Source
Invokes
Event Source
Polls
Service Bus
Storage queue
Storage blob
Notification
Hubs
Connected
services
Pull model
Event models: Azure way
Push model
Bitbucket
Azure alert
Dropbox
Logic App
GitHub
Scheduler
HTTP Request
Event models: Azure way
Push model
Event models: Lambda way
Amazon S3
Amazon
DynamoDB
Amazon Kinesis
Amazon SNS
Amazon CloudWatch
AWS CloudFormation
API Gateway
Amazon SES
Pull model
Lambda function:
• Has its own unique id (ARN)
arn:aws:lambda:eu-central-1:854958518097:function:QueuePoller
• Has role with permissions
AWS Authorization types
• Role-based
• Identity-based
Amazon S3
Amazon
DynamoDB
AWS STS
Role
Role
AWS STS
Permissions
User
Architecture: Azure Functions
w3wp (SCM)
Azure
Functions
app
w3wp
(WebHost app)
APIScript Host
Event Source Event Source Event Source
AWS Lambda infrastructure
Container pool
Functions
Container
Wraps
Executes
Wraps
Goes to pool
Architecture: AWS Lambda
Features comparison
Azure Functions AWS Lambda
Input/Output binding -
Deep integration with other services
Multiple trigger source
HTTP functions out-of-the box
Automatic package restore support
Code sharing
Call function from another function +
IDE support - +
Number of supported languages 7 3
Wide list of deployment options + -
Debugging Local/Remote Local
Testing Local/Remote Local/Remote
AWS Lambda documentation:
https://aws.amazon.com/documentation/lambda/
Azure Functions documentation:
https://azure.microsoft.com/en-us/documentation/services/functions/
SDK repositories:
https://github.com/Azure/azure-webjobs-sdk
https://github.com/Azure/azure-webjobs-sdk-script
https://github.com/Azure/azure-webjobs-sdk-extensions
Resources
Q&A

Azure Functions VS AWS Lambda: overview and comparison