SlideShare a Scribd company logo
Serverless
Architectures on AWS
in practice
Manish Pandit
07/19/2018
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
If I had asked people what they wanted, they would have said: “faster horses”
-Henry Ford
The Journey
About Me
Manish Pandit
Director of Platform Engineering @marqeta
@lobster1234
lobster1234.github.io
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
Why?
Scale technology to support the growing business
Use public cloud capabilities so we can focus on product innovation
Break down the monolith
Shrink the Infrastructure
Cloud-Native-First Mindset
..and many more
Microservices
Independent development, deployment, and scaling of functionally isolated
services.
Microservices
“Loosely coupled, yet highly aligned”
Microservices
You can have microservices without containers and serverless!
Containers and Serverless are the most optimal way to package and deploy
microservices.
Abstractions
Bare Metal
O/S
Application
Fn
Serverless
Containers
VMs
Hardware
Containers
Distributed Applications/Services
Economics of Scale - Optimal Resource Utilization
Being lightweight, they’re fast to deploy and run
Serverless
Function as a unit of deployment (FaaS)
Pay for what you use, never for idle resources
100% abstraction from underlying resources
Serverless Components
1. Functions themselves
2. Events that trigger these functions, or handlers
Event driven programming - Functions are event handlers
You only pay when the handler runs
Lambda
Amazon’s FaaS
Supports Node, Python, Java 8, C#, Go
Billed as GB-seconds
Lambda Pricing
First 1M requests per month are free
400,000 GB-seconds per month are free
START RequestId: 6bd9cf60-7e2b-11e8-9f4a-ebdea81e794d Version: $LATEST
END RequestId: 6bd9cf60-7e2b-11e8-9f4a-ebdea81e794d
REPORT RequestId: 6bd9cf60-7e2b-11e8-9f4a-ebdea81e794d Duration: 646.26 ms Billed Duration: 700 ms
Memory Size: 128 MB Max Memory Used: 31 MB
Use Cases
Consul Backups
GET /v1/catalog/service/mqapi
PutObject
trigger
Database Replication Jobs
Get updates
PutObject
trigger apply
Async Events
publish
publish
trigger
trigger
Service A
Service B
Service C
ECS
File Processing Pipeline
Split PGP &
Transfer
Payment
Networks
Banks
trigger
trigger
N 1
Object + Metadata
Lambda limits
Memory : 128-3008 MB with 64 MB increments
Time : 300 seconds
Batch Jobs
AWS Batch : Managed Compute
https://.. Submitter
Job
Job
Job
Batch
Cloudwatch Event
Containers not Serverless Enough?
= ECS minus the Cluster
Logging
For Lambdas, Cloudwatch logs
For ECS, filebeat agent on the host
For Fargate, LogStashTcpSocketAppender
Monitoring and Alerting
Testing
Docker Compose
Localstack
Use environment variables for configuration (12-Factor App)
Gotchas..
- Lambda Cold start on both Python and Java
- Due to VPC and ENI
- Be aware of the retries
- Async invocation gets two retries
- Sync invocation gets no retries
- Apply the Principle of Least Privilege to the Lambda and ECS Roles
- S3 triggers - source and destination buckets
Serverless Architectures on AWS in practice - OSCON 2018
Tips
- Declare connection pools outside of the handler’s scope
- Write tests!
- Test locally - the only error you should be expecting is IAM Permissions error.
<role> is not authorized to perform: <operation> on resource: <resource>
- Do not create Microliths
- Set up billing alerts
Tips
- Pick the best tool for the job
- Do not pick the tool and try to fit the job into it
- Beware of the shiny object syndrome
- Take measured risks
- Production is (mostly) unforgiving
Serverless Architectures on AWS in practice - OSCON 2018
“You’re free to choose, but you’re not free from the consequences of your choice”
- Universal Paradox
Fin
Manish Pandit
Director of Platform Engineering @marqeta
@lobster1234
lobster1234.github.io

More Related Content

PDF
Disaster recovery - What, Why, and How
PDF
Solving Problems At Scale With Redis
PPTX
Redis Reliability, Performance & Innovation
PPTX
Svc 202-netflix-open-source
PPTX
Cloud cost optimization (AWS, GCP)
PPTX
Reports from the field azure functions in practice
PPTX
Virtualization - Is It Right For You?
PPTX
Windows Azure Versioning Strategies
Disaster recovery - What, Why, and How
Solving Problems At Scale With Redis
Redis Reliability, Performance & Innovation
Svc 202-netflix-open-source
Cloud cost optimization (AWS, GCP)
Reports from the field azure functions in practice
Virtualization - Is It Right For You?
Windows Azure Versioning Strategies

What's hot (15)

PDF
Introduction to IAC and Terraform
PDF
Characterizing Network Paths in and out of the Clouds
PPTX
Characterizing network paths in and out of the Clouds
PDF
Dip into prometheus
PPTX
High Performance Computing (HPC) in cloud
PDF
Cassandra Summit 2014: Cassandra Compute Cloud: An elastic Cassandra Infrastr...
PPTX
Ten^H^H^H Many Cloud App Design Patterns
PPTX
Disaster recovery and the cloud
PDF
1 Million Writes per second on 60 nodes with Cassandra and EBS
PPTX
Orange developers day-Application Caching
PDF
OpenNebulaConf2015 1.03 Private, Public, Hybrid: The Real Economics of Open S...
PDF
Lessons learned from writing over 300,000 lines of infrastructure code
PDF
openstack, devops and people
PDF
deep learning in production cff 2017
PDF
Embracing clouds
Introduction to IAC and Terraform
Characterizing Network Paths in and out of the Clouds
Characterizing network paths in and out of the Clouds
Dip into prometheus
High Performance Computing (HPC) in cloud
Cassandra Summit 2014: Cassandra Compute Cloud: An elastic Cassandra Infrastr...
Ten^H^H^H Many Cloud App Design Patterns
Disaster recovery and the cloud
1 Million Writes per second on 60 nodes with Cassandra and EBS
Orange developers day-Application Caching
OpenNebulaConf2015 1.03 Private, Public, Hybrid: The Real Economics of Open S...
Lessons learned from writing over 300,000 lines of infrastructure code
openstack, devops and people
deep learning in production cff 2017
Embracing clouds
Ad

Similar to Serverless Architectures on AWS in practice - OSCON 2018 (20)

PDF
Serverless use cases with AWS Lambda
PDF
Microservices and Serverless for Mega Startups - DevOps IL Meetup
PPTX
Primeros pasos en desarrollo serverless
PDF
DevOpsDaysRiga 2018: Serhat Can - The Rocky Path to Migrating Production Appl...
PDF
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
PDF
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
PDF
AWSomeDay Zurich 2018 - How to go serverless
PPTX
Serverless at Lifestage
PDF
Serverless AWS reInvent 2019 recap
PDF
State of serverless
PPTX
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...
PDF
Serverless use cases with AWS Lambda - More Serverless Event
PDF
Introduction to the Serverless paradigm
PDF
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
PDF
Serverless / FaaS / Lambda and how it relates to Microservices
PPTX
Serverless applications
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
PDF
Introduction to Serverless through Architectural Patterns
PDF
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
PDF
Serverless - The Future of the Cloud?!
Serverless use cases with AWS Lambda
Microservices and Serverless for Mega Startups - DevOps IL Meetup
Primeros pasos en desarrollo serverless
DevOpsDaysRiga 2018: Serhat Can - The Rocky Path to Migrating Production Appl...
Introducing to serverless computing and AWS lambda - Israel Clouds Meetup
Introduction to Serverless Computing and AWS Lambda - AWS IL Meetup
AWSomeDay Zurich 2018 - How to go serverless
Serverless at Lifestage
Serverless AWS reInvent 2019 recap
State of serverless
Serverless Presentation from Devoxx 2017 Casablanca (AWS Lambda / FaaS / Fn ...
Serverless use cases with AWS Lambda - More Serverless Event
Introduction to the Serverless paradigm
«Что такое serverless-архитектура и как с ней жить?» Николай Марков, Aligned ...
Serverless / FaaS / Lambda and how it relates to Microservices
Serverless applications
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Introduction to Serverless through Architectural Patterns
Operating Microservices at Hyperscale — Tech in Asia PDC 2019
Serverless - The Future of the Cloud?!
Ad

More from Manish Pandit (20)

PDF
Disaster Recovery and Reliability
PDF
OAuth2 primer
PDF
Immutable AWS Deployments with Packer and Jenkins
PDF
AWS Lambda with Serverless Framework and Java
PDF
AWS Primer and Quickstart
PPTX
Securing your APIs with OAuth, OpenID, and OpenID Connect
PDF
Silicon Valley 2014 - API Antipatterns
PDF
Scalabay - API Design Antipatterns
PDF
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
PPTX
API Design Antipatterns - APICon SF
PPTX
Motivation : it Matters
PPTX
Building Apis in Scala with Playframework2
PPTX
Scala at Netflix
PPT
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
PPT
Evolving IGN’s New APIs with Scala
PPTX
IGN's V3 API
PPTX
Java and the JVM
PPTX
Object Oriented Programming
PPTX
Silicon Valley Code Camp 2011: Play! as you REST
PPTX
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Disaster Recovery and Reliability
OAuth2 primer
Immutable AWS Deployments with Packer and Jenkins
AWS Lambda with Serverless Framework and Java
AWS Primer and Quickstart
Securing your APIs with OAuth, OpenID, and OpenID Connect
Silicon Valley 2014 - API Antipatterns
Scalabay - API Design Antipatterns
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
API Design Antipatterns - APICon SF
Motivation : it Matters
Building Apis in Scala with Playframework2
Scala at Netflix
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Evolving IGN’s New APIs with Scala
IGN's V3 API
Java and the JVM
Object Oriented Programming
Silicon Valley Code Camp 2011: Play! as you REST
Silicon Valley Code Camp: 2011 Introduction to MongoDB

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PPTX
Big Data Technologies - Introduction.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
Teaching material agriculture food technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Spectroscopy.pptx food analysis technology
Big Data Technologies - Introduction.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Unlocking AI with Model Context Protocol (MCP)
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx

Serverless Architectures on AWS in practice - OSCON 2018