SlideShare a Scribd company logo
SERHAT CAN • SOFTWARE ENGINEER • @SRHTCN•
Serverless Architectures on
AWS Lambda

The OpsGenie Experience
Forward IT alerts to
OpsGenie
View alerts using the
mobile app
Get notified via email,
SMS, mobile push
and phone calls
Define On-call schedules
and escalations policies
Respond to alerts
directly from
the OpsGenie app
• Does not mean running code without servers
• Cloud provider manages servers and provisioning
• No more long-running virtual machines
• Event driven - starts & stops execution between each
request
• Pay only when your code executed
What is Serverless (FaaS)
What is Serverless (FaaS)
Serverless Architectures on AWS Lambda
• Amazon S3
• Amazon DynamoDB
• Amazon Kinesis Streams
• Amazon Simple Notification Service
• Amazon Simple Email Service
• Amazon Cognito
• AWS CloudFormation
• Amazon CloudWatch Logs
Events
• Amazon CloudWatch Events
• AWS CodeCommit
• Scheduled Events (powered by Amazon CloudWatch Events)
• AWS Config
• Amazon Echo
• Amazon Lex
• Amazon API Gateway
• Client SDK
Limitations
Language limitations (Java, Nodejs, Python, C#)
Max memory is 1,5GB
Maximum execution duration per request 300 seconds
Concurrent executions 1000 (Immediate Increase to 3000)
Some of the Important Features
• VPC Support
• Environment Variables
• Dead Letter Queue
• Function Versioning and Aliases
• Tagging
Real Life
Use Cases
from OpsGenie
• Java8 (mostly)
• Node.js & Python for custom solutions
• Custom Deployment Solution written in Java 

(in DevOps Team)
• Serverless.js
Our Serverless Stack
• Operating on multiple AZ’s is good but not enough
• Even services with 99.99999999999% durability, 99.99%
availability can’t be trusted
• Needed to be ready for regional failures
• Goal is full region switch within a few minutes if not seconds
• Next step: operate on multiple regions simultaneously
Reliability Needs of OpsGenie
Use Cases
DynamoDB Cross Region Replication
Motivation:
• Needed to replicate our data in DynamoDB to another region
for high availability
DynamoDB 

Cross Region

Replication
Reporting
Motivation:
• Robust architecture with minimal effort.
• Extremely scalable reporting service with SQL like aggregation
features.
Reporting
DynamoDB AutoScale
Motivation:
• Needed an automated way to scale DynamoDB to avoid

read & write throttles
• Capacity needs to be adjusted during migration
DynamoDB AutoScale
Elasticsearch Indexing
Motivation:
• Needed to index our data to ES
• Our ES data should be available in every region we operate
• Cross region replication should not be included in the
application logic as much as possible
Elasticsearch Indexing - Very Soon
• AWS Lambda is a life saver for custom solutions, because;
• Customers do not need to manage servers
• Easy to deploy (give a .zip file)
• Real pay what you use pricing 

(not hourly but for each 100ms execution time)
Custom Solutions & Integrations
Custom Solutions & Integrations
Custom Solutions & Integrations
Service and Incident Management
Motivation:
• A fully featured pilot project implement 

in Serverless Architecture
Service and Incident Management
Challenges
Java Cold Start Time
Proper Monitoring
Deployment
• Lambda functions, written in Java, experience a latency
during new container initialization mainly caused by Java
class loading
• To avoid this we are experimenting an approach called
“Warmup Lambda”
• Warmup Lambda is a lambda function that aims to keep a
given number of concurrent lambda functions up, to avoid the
startup latency
Java Cold Start Time
• No way to attach NewRelic agent to AWS Lambda
• We wanted to use NewRelic’s capabilities like NRQL
• Logs are processed using Cloudwatch trigger and sent to
NewRelic, Elasticsearch etc.
• Just started experimenting new 

AWS X-Ray (Distributed Tracing System)
Proper Monitoring
AWS X-Ray
• X-Ray provides an end-to-end view of requests as they travel
through your application, and shows a map of your
application’s underlying components
AWS X-Ray
AWS X-Ray
• Blue green deployment using Alias support
• Allows our applications to call different Lambda function
versions during deployment using Lambda SDK
Deployment
For more



engineering.opsgenie.com
Serverless Architectures on AWS Lambda
Thank you!
Stay connected!
@srhtcn

More Related Content

What's hot (13)

PDF
AWS Lambda
Danilo Poccia
 
PDF
How to Use AWS Lambda Layers and Lambda Runtime
Donnie Prakoso
 
PPTX
AWS Lambda
Muhammed YALÇIN
 
PDF
AWS Serverless Introduction (Lambda)
Ashish Kushwaha
 
PDF
Serverless Computing
Rushi Namani
 
PDF
Amazon Elastic Block Storage and Balancer
Whizlabs
 
PPTX
Serverless computing
Dmitriy Ivanov
 
PPTX
AWS Lambda
Julian Kleinhans
 
PDF
AWS Lambda
Scott Leberknight
 
PDF
When Should You Use AWS Lambda?
Whizlabs
 
PDF
AWS Lambda Tutorial
Whizlabs
 
PDF
AWS Lambda from the Trenches
Yan Cui
 
PDF
Aws cloud best_practices
Suruli Kannan
 
AWS Lambda
Danilo Poccia
 
How to Use AWS Lambda Layers and Lambda Runtime
Donnie Prakoso
 
AWS Lambda
Muhammed YALÇIN
 
AWS Serverless Introduction (Lambda)
Ashish Kushwaha
 
Serverless Computing
Rushi Namani
 
Amazon Elastic Block Storage and Balancer
Whizlabs
 
Serverless computing
Dmitriy Ivanov
 
AWS Lambda
Julian Kleinhans
 
AWS Lambda
Scott Leberknight
 
When Should You Use AWS Lambda?
Whizlabs
 
AWS Lambda Tutorial
Whizlabs
 
AWS Lambda from the Trenches
Yan Cui
 
Aws cloud best_practices
Suruli Kannan
 

Similar to Serverless Architectures on AWS Lambda (20)

PPTX
Serverlessusecase workshop feb3_v2
kartraj
 
PPTX
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
Chris Munns
 
PPTX
Serverless without Code (Lambda)
CloudHesive
 
PPTX
Serverless Generative AI on AWS, AWS User Groups of Florida
CloudHesive
 
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Dhaval Nagar
 
PDF
eChai Developer Meetup | Cloud Native Learnings with AWS
Dhaval Nagar
 
PDF
Serverless use cases with AWS Lambda - More Serverless Event
Boaz Ziniman
 
PDF
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
CodeOps Technologies LLP
 
PDF
DevOpsDaysRiga 2018: Serhat Can - The Rocky Path to Migrating Production Appl...
DevOpsDays Riga
 
PPTX
From Monolithic to Modern Apps: Best Practices
Tom Laszewski
 
PDF
Serverless Architectural Patterns & Best Practices
Daniel Zivkovic
 
PDF
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Donnie Prakoso
 
PDF
Crio.do - Deployment on AWS Masterclass
Dhaval Nagar
 
PDF
Serverless Design Patterns
Yan Cui
 
PDF
Serveless design patterns (VoxxedDays Luxembourg)
Yan Cui
 
PDF
Serverless AWS reInvent 2019 recap
Daniel Zivkovic
 
PDF
Modern Applications Development on AWS
Boaz Ziniman
 
PDF
Serverless use cases with AWS Lambda
Boaz Ziniman
 
PDF
Serverless best practices plus design principles 20m version
Heitor Lessa
 
PPTX
Serverless architectures: APIs, Serverless Functions, Microservices - How to ...
Bala Subra
 
Serverlessusecase workshop feb3_v2
kartraj
 
AWS Startup Day - Boston 2018 - The Best Practices and Hard Lessons Learned o...
Chris Munns
 
Serverless without Code (Lambda)
CloudHesive
 
Serverless Generative AI on AWS, AWS User Groups of Florida
CloudHesive
 
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Dhaval Nagar
 
eChai Developer Meetup | Cloud Native Learnings with AWS
Dhaval Nagar
 
Serverless use cases with AWS Lambda - More Serverless Event
Boaz Ziniman
 
Serverless Architectural Patterns 
and Best Practices - Madhu Shekar - AWS
CodeOps Technologies LLP
 
DevOpsDaysRiga 2018: Serhat Can - The Rocky Path to Migrating Production Appl...
DevOpsDays Riga
 
From Monolithic to Modern Apps: Best Practices
Tom Laszewski
 
Serverless Architectural Patterns & Best Practices
Daniel Zivkovic
 
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Donnie Prakoso
 
Crio.do - Deployment on AWS Masterclass
Dhaval Nagar
 
Serverless Design Patterns
Yan Cui
 
Serveless design patterns (VoxxedDays Luxembourg)
Yan Cui
 
Serverless AWS reInvent 2019 recap
Daniel Zivkovic
 
Modern Applications Development on AWS
Boaz Ziniman
 
Serverless use cases with AWS Lambda
Boaz Ziniman
 
Serverless best practices plus design principles 20m version
Heitor Lessa
 
Serverless architectures: APIs, Serverless Functions, Microservices - How to ...
Bala Subra
 
Ad

Recently uploaded (20)

PPTX
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
PDF
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
PDF
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
PDF
Electrical Engineer operation Supervisor
ssaruntatapower143
 
PDF
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPTX
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
PDF
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
PDF
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
PDF
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
PDF
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
PPTX
Distribution reservoir and service storage pptx
dhanashree78
 
PPTX
How Industrial Project Management Differs From Construction.pptx
jamespit799
 
PPTX
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
PPT
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
PDF
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
PPTX
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
PPTX
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
PDF
Digital water marking system project report
Kamal Acharya
 
PDF
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
PPT
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
MODULE 05 - CLOUD COMPUTING AND SECURITY.pptx
Alvas Institute of Engineering and technology, Moodabidri
 
REINFORCEMENT LEARNING IN DECISION MAKING SEMINAR REPORT
anushaashraf20
 
Viol_Alessandro_Presentazione_prelaurea.pdf
dsecqyvhbowrzxshhf
 
Electrical Engineer operation Supervisor
ssaruntatapower143
 
aAn_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
Water Resources Engineering (CVE 728)--Slide 4.pptx
mohammedado3
 
Reasons for the succes of MENARD PRESSUREMETER.pdf
majdiamz
 
Halide Perovskites’ Multifunctional Properties: Coordination Engineering, Coo...
TaameBerhe2
 
WD2(I)-RFQ-GW-1415_ Shifting and Filling of Sand in the Pond at the WD5 Area_...
ShahadathHossain23
 
Pressure Measurement training for engineers and Technicians
AIESOLUTIONS
 
Distribution reservoir and service storage pptx
dhanashree78
 
How Industrial Project Management Differs From Construction.pptx
jamespit799
 
DATA BASE MANAGEMENT AND RELATIONAL DATA
gomathisankariv2
 
Footbinding.pptmnmkjkjkknmnnjkkkkkkkkkkkkkk
mamadoundiaye42742
 
Basic_Concepts_in_Clinical_Biochemistry_2018كيمياء_عملي.pdf
AdelLoin
 
美国电子版毕业证南卡罗莱纳大学上州分校水印成绩单USC学费发票定做学位证书编号怎么查
Taqyea
 
Biosensors, BioDevices, Biomediccal.pptx
AsimovRiyaz
 
Digital water marking system project report
Kamal Acharya
 
mbse_An_Introduction_to_Arcadia_20150115.pdf
henriqueltorres1
 
New_school_Engineering_presentation_011707.ppt
VinayKumar304579
 
Ad

Serverless Architectures on AWS Lambda

  • 1. SERHAT CAN • SOFTWARE ENGINEER • @SRHTCN• Serverless Architectures on AWS Lambda
 The OpsGenie Experience
  • 2. Forward IT alerts to OpsGenie View alerts using the mobile app Get notified via email, SMS, mobile push and phone calls Define On-call schedules and escalations policies Respond to alerts directly from the OpsGenie app
  • 3. • Does not mean running code without servers • Cloud provider manages servers and provisioning • No more long-running virtual machines • Event driven - starts & stops execution between each request • Pay only when your code executed What is Serverless (FaaS)
  • 6. • Amazon S3 • Amazon DynamoDB • Amazon Kinesis Streams • Amazon Simple Notification Service • Amazon Simple Email Service • Amazon Cognito • AWS CloudFormation • Amazon CloudWatch Logs Events • Amazon CloudWatch Events • AWS CodeCommit • Scheduled Events (powered by Amazon CloudWatch Events) • AWS Config • Amazon Echo • Amazon Lex • Amazon API Gateway • Client SDK
  • 7. Limitations Language limitations (Java, Nodejs, Python, C#) Max memory is 1,5GB Maximum execution duration per request 300 seconds Concurrent executions 1000 (Immediate Increase to 3000)
  • 8. Some of the Important Features • VPC Support • Environment Variables • Dead Letter Queue • Function Versioning and Aliases • Tagging
  • 10. • Java8 (mostly) • Node.js & Python for custom solutions • Custom Deployment Solution written in Java 
 (in DevOps Team) • Serverless.js Our Serverless Stack
  • 11. • Operating on multiple AZ’s is good but not enough • Even services with 99.99999999999% durability, 99.99% availability can’t be trusted • Needed to be ready for regional failures • Goal is full region switch within a few minutes if not seconds • Next step: operate on multiple regions simultaneously Reliability Needs of OpsGenie
  • 13. DynamoDB Cross Region Replication Motivation: • Needed to replicate our data in DynamoDB to another region for high availability
  • 15. Reporting Motivation: • Robust architecture with minimal effort. • Extremely scalable reporting service with SQL like aggregation features.
  • 17. DynamoDB AutoScale Motivation: • Needed an automated way to scale DynamoDB to avoid
 read & write throttles • Capacity needs to be adjusted during migration
  • 19. Elasticsearch Indexing Motivation: • Needed to index our data to ES • Our ES data should be available in every region we operate • Cross region replication should not be included in the application logic as much as possible
  • 21. • AWS Lambda is a life saver for custom solutions, because; • Customers do not need to manage servers • Easy to deploy (give a .zip file) • Real pay what you use pricing 
 (not hourly but for each 100ms execution time) Custom Solutions & Integrations
  • 22. Custom Solutions & Integrations
  • 23. Custom Solutions & Integrations
  • 24. Service and Incident Management Motivation: • A fully featured pilot project implement 
 in Serverless Architecture
  • 25. Service and Incident Management
  • 26. Challenges Java Cold Start Time Proper Monitoring Deployment
  • 27. • Lambda functions, written in Java, experience a latency during new container initialization mainly caused by Java class loading • To avoid this we are experimenting an approach called “Warmup Lambda” • Warmup Lambda is a lambda function that aims to keep a given number of concurrent lambda functions up, to avoid the startup latency Java Cold Start Time
  • 28. • No way to attach NewRelic agent to AWS Lambda • We wanted to use NewRelic’s capabilities like NRQL • Logs are processed using Cloudwatch trigger and sent to NewRelic, Elasticsearch etc. • Just started experimenting new 
 AWS X-Ray (Distributed Tracing System) Proper Monitoring
  • 29. AWS X-Ray • X-Ray provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components
  • 32. • Blue green deployment using Alias support • Allows our applications to call different Lambda function versions during deployment using Lambda SDK Deployment