SlideShare a Scribd company logo
Going Serverless
in Production: Lessons Learned
ADHY WIRANATA PRASETYO
Technology Lead, HACKTIV8
SERVERLESS
WHAT
And Why Serverless ?
Serverless computing is a cloud-computing execution
model in which the cloud provider runs the server, and
dynamically manages the allocation of machine resources.
Pricing is based on the actual amount of resources
consumed by an application, rather than on pre-purchased
units of capacity. It can be a form of utility computing.
*stolen shamelessly from wikipedia.
WHAT
And Why
WHAT
And Why Serverless ?
Run applications / functions without the hassle of
managing the server infrastructure. It’s fully Managed!
WHAT
And Why Serverless Technologies
Serverless Compute / Cloud Functions
Backend as a Service
etc...
WHAT
And Why Available Options
Serverless Compute / Functions
WHAT
And Why JUST DO IT!
We did some readings, but we quickly get our hands dirty
with it.
WHAT
And Why JUST DO IT! OOPS..
We did some readings, but we quickly get our hands dirty
with it. We found issues along the way though..
WHAT
And Why AWS Lambda?
Functions and Events.
Event triggers a function. Function is just a code that works.
That’s it!
WHAT
And Why Sample Lambda Function
WHAT
And Why Why AWS Lambda ?
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort.
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
Pay per Use, Infinitely Scalable.
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
Pay per Use, Infinitely Scalable. Your budget.. Most likely
not.
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
Pay per Use, Infinitely Scalable. Your budget.. Most likely
not.
Deliver values faster.
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
Pay per Use, Infinitely Scalable. Your budget.. Most likely
not.
Deliver values faster. Only care for the implementation
code*.
* Baca aturan pakai. Jika pusing berlanjut, jangan hubungi saya.
WHAT
And Why Why AWS Lambda ?
Zero Provisioning Effort. Minimal ops and fully managed!
Pay per Use, Infinitely Scalable. Your budget.. Most likely
not.
Deliver values faster. Only care for the implementation
code*.
Sleep.
* Baca aturan pakai. Jika pusing berlanjut, jangan hubungi saya.
WHAT
LimitationsAnd Why
WHAT
Limitations
15 Minutes invocation time
And Why
WHAT
Limitations
15 Minutes invocation time
30 Seconds API Gateway response
And Why
WHAT
Limitations
15 Minutes invocation time
30 Seconds API Gateway response
250 MB package size
And Why
WHAT
Limitations
15 Minutes invocation time
30 Seconds API Gateway response
250 MB package size
No Persistence, such as DB pooling
And Why
WHAT
Limitations
15 Minutes invocation time
30 Seconds API Gateway response
250 MB package size
No Persistence, such as DB pooling
Cold Starts (~0.5seconds in Js)
And Why
EXPERIMENTS
EXP
Our Cases What we initially expect
What we end up with
EXP
Our Cases
Our Usage
150+ Lambda Functions (in TypeScript and
Go)
Easy to write!
EXP
Our Cases
Our Cases
Video Transcoding
Long-running, Data Calculations
Data Fetching
Communication between Services
EXP
Our Cases
Case #1: Video Transcoding
1. Admin is able to upload raw video
2. Service will transcode to multiple
resolutions
3. Notify the admin when transcoding
process finished
EXP
Our Cases
Case #1: Video Transcoding
EXP
Our Cases
S3 Bucket (Raw)
User Uploads
to S3
1 2
Case #1: Video Transcoding
EXP
Our Cases
S3 Bucket (Raw) Lambda Function
User Uploads
to S3
1 2 3
Case #1: Video Transcoding
EXP
Our Cases
S3 Bucket (Raw)
Media Convert
Lambda Function
User Uploads
to S3
1 2 3
4
Case #1: Video Transcoding
EXP
Our Cases
S3 Bucket (Raw)
S3 Bucket
Media Convert
Lambda Function
User Uploads
to S3
1 2 3
45
Case #1: Video Transcoding
EXP
Our Cases
S3 Bucket (Raw)
S3 Bucket
Media Convert
Lambda Function
User Uploads
to S3
Lambda Function
For Notifications
1 2 3
45
6
Case #2: Data Calculation
1. A scheduler which regularly fetches data
from a certain data source
2. A service will do some data calculation
based on the data source and write to
another data store
EXP
Our Cases
Case #2: Data Calculation
EXP
Our Cases
Cloudwatch Event
1
Case #2: Data Calculation
EXP
Our Cases
Lambda FunctionCloudwatch Event
1 2
Case #2: Data Calculation
EXP
Our Cases
Lambda Function PostgreSQL on RDSCloudwatch Event
1 2 3
Case #2: Data Calculation
EXP
Our Cases
Lambda Function PostgreSQL on RDSCloudwatch Event
1 2 3
TIMEOUT!
Case #2: Data Calculation
Well, we can actually use a recursive for long
running task, but we haven’t tried that method
EXP
Our Cases
Lambda Function PostgreSQL on RDSCloudwatch Event
1 2 3
TIMEOUT!
Case #3: Data Fetching
1. Front-End requests a data from API
(REST or GraphQL)
2. Service will connect to database and
return the data as response
EXP
Our Cases
Case #3: Data Fetching
EXP
Our Cases
Lambda Function
2
API Gateway
1
Case #3: Data Fetching
EXP
Our Cases
Lambda Function
2
API Gateway
1
PostgreSQL on RDS
3
Case #3: Data Fetching
EXP
Our Cases
Lambda Function
2
API Gateway
1
PostgreSQL on RDS
3
Cold Start!
DB connections issue
Case #4: Comms Between
Services
1. Front End requests data to Service A
2. Service A will do a process, then calls
Service B
3. Service B will be invoked and fetch data
from Database
4. Return the response to Front End
EXP
Our Cases
Case #4: Comms Between
Services
EXP
Our Cases
Lambda Function
2
API Gateway
1
Case #4: Comms Between
Services
EXP
Our Cases
Lambda Function
2
API Gateway
1
API Gateway
3
Case #4: Comms Between
Services
EXP
Our Cases
Lambda Function
2
API Gateway
1
API Gateway
3
Lambda Function
4
Case #4: Comms Between
Services
EXP
Our Cases
Lambda Function
2
API Gateway
1
PostgreSQL on RDS
5
API Gateway
3
Lambda Function
4
Case #4: Comms Between
Services
EXP
Our Cases
Lambda Function
2
API Gateway
1
PostgreSQL on RDS
5
API Gateway
3
Lambda Function
4
Network Latency!
Cost
Pay for API gateway and lambda execution.
Slow functions = 💸🔥
EXP
Our Cases
API Gateway Lambda Function
Cost
Pay for API gateway and lambda execution.
Extra wait time for functions = 💸🔥🔥🔥
EXP
Our Cases
Code Reusability: Shared Library
We use shared library to reuse codes like utilities or helpers.
Issue: Redeploy functions for each new versions.
EXP
Our Cases
Lambda Function Lambda Function Lambda Function
Shared Code (Library)
Code Reusability: Service
We use service to reuse codes as service with synchronous
communication. Issue: network latency, obviously..
EXP
Our Cases
Lambda Function Lambda Function Lambda Function
Shared Code (Lambda Function)
Deployment
Using Serverless Framework. You can use SAM template or
Apex UP as well
Tip: Watch out for your deployment bucket. You’ll fill up
your S3 Bucket quickly if you do not set it.
EXP
Our Cases
Debugging
EXP
Our Cases
Debugging
EXP
Our Cases
SUMMARY
SUM
Finally So, Are we still using
serverless functions ?
Yes, but not 100%.
We moved some of the heavier workloads to AWS ECS
(Elastic Container Service). Still serverless!
Majority of others still remain in AWS Lambda
SUM
Finally Lesson Learned.
We’re not the expert in Serverless technology,
in this case, AWS Lambda. So we did things
wrong in the past.
We’re still improving!
ENJOY YOUR PRODUCTIVE DAYS
WITH SERVERLESS!

More Related Content

What's hot

Chatbots with Serverless
Chatbots with ServerlessChatbots with Serverless
Chatbots with Serverless
Srushith Repakula
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Amazon Web Services
 
How to build observability into a serverless application
How to build observability into a serverless applicationHow to build observability into a serverless application
How to build observability into a serverless application
Yan Cui
 
Frail & Cast Iron tools - a Postman Case Study
Frail & Cast Iron tools - a Postman Case StudyFrail & Cast Iron tools - a Postman Case Study
Frail & Cast Iron tools - a Postman Case Study
Postman
 
Purify your Lambdas
Purify your LambdasPurify your Lambdas
Purify your Lambdas
Luis Ángel Vicente Sánchez
 
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
AWS Fargate AWS UG Dormund 2019 Kazulkin JungAWS Fargate AWS UG Dormund 2019 Kazulkin Jung
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
Vadym Kazulkin
 
AWS Serverless Development
AWS Serverless DevelopmentAWS Serverless Development
AWS Serverless Development
Amazon Web Services
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
Amazon Web Services
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
Amazon Web Services
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Amazon Web Services
 
How to build a social network on serverless
How to build a social network on serverlessHow to build a social network on serverless
How to build a social network on serverless
Yan Cui
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
Amazon Web Services
 
Design Patterns for Developers - Technical 201
Design Patterns for Developers - Technical 201Design Patterns for Developers - Technical 201
Design Patterns for Developers - Technical 201
Amazon Web Services
 
Troubleshooting serverless applications
Troubleshooting serverless applicationsTroubleshooting serverless applications
Troubleshooting serverless applications
Yan Cui
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Amazon Web Services
 
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
Xamarin
 
API310 - How to refactor a monolith to serverless in 8 steps
API310 - How to refactor a monolith to serverless in 8 stepsAPI310 - How to refactor a monolith to serverless in 8 steps
API310 - How to refactor a monolith to serverless in 8 steps
Yan Cui
 
Debugging AWS Lambda Performance Issues
Debugging AWS Lambda Performance  IssuesDebugging AWS Lambda Performance  Issues
Debugging AWS Lambda Performance Issues
Yan Cui
 
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
Amazon Web Services
 
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
Amazon Web Services
 

What's hot (20)

Chatbots with Serverless
Chatbots with ServerlessChatbots with Serverless
Chatbots with Serverless
 
Building Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API GatewayBuilding Serverless Backends with AWS Lambda and Amazon API Gateway
Building Serverless Backends with AWS Lambda and Amazon API Gateway
 
How to build observability into a serverless application
How to build observability into a serverless applicationHow to build observability into a serverless application
How to build observability into a serverless application
 
Frail & Cast Iron tools - a Postman Case Study
Frail & Cast Iron tools - a Postman Case StudyFrail & Cast Iron tools - a Postman Case Study
Frail & Cast Iron tools - a Postman Case Study
 
Purify your Lambdas
Purify your LambdasPurify your Lambdas
Purify your Lambdas
 
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
AWS Fargate AWS UG Dormund 2019 Kazulkin JungAWS Fargate AWS UG Dormund 2019 Kazulkin Jung
AWS Fargate AWS UG Dormund 2019 Kazulkin Jung
 
AWS Serverless Development
AWS Serverless DevelopmentAWS Serverless Development
AWS Serverless Development
 
Advanced Container Management and Scheduling
Advanced Container Management and SchedulingAdvanced Container Management and Scheduling
Advanced Container Management and Scheduling
 
Managing the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS LambdaManaging the Continuous Delivery of Code to AWS Lambda
Managing the Continuous Delivery of Code to AWS Lambda
 
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
Building CICD Pipelines for Serverless Applications - DevDay Los Angeles 2017
 
How to build a social network on serverless
How to build a social network on serverlessHow to build a social network on serverless
How to build a social network on serverless
 
Advanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step FunctionsAdvanced Serverless Apps With Step Functions
Advanced Serverless Apps With Step Functions
 
Design Patterns for Developers - Technical 201
Design Patterns for Developers - Technical 201Design Patterns for Developers - Technical 201
Design Patterns for Developers - Technical 201
 
Troubleshooting serverless applications
Troubleshooting serverless applicationsTroubleshooting serverless applications
Troubleshooting serverless applications
 
Serverless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDBServerless Web Apps using API Gateway, Lambda and DynamoDB
Serverless Web Apps using API Gateway, Lambda and DynamoDB
 
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of XamarinC# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
C# Async on iOS and Android - Miguel de Icaza, CTO of Xamarin
 
API310 - How to refactor a monolith to serverless in 8 steps
API310 - How to refactor a monolith to serverless in 8 stepsAPI310 - How to refactor a monolith to serverless in 8 steps
API310 - How to refactor a monolith to serverless in 8 steps
 
Debugging AWS Lambda Performance Issues
Debugging AWS Lambda Performance  IssuesDebugging AWS Lambda Performance  Issues
Debugging AWS Lambda Performance Issues
 
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
(DVO203) The Life of a Netflix Engineer Using 37% of the Internet
 
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
(DVO202) DevOps at Amazon: A Look At Our Tools & Processes
 

Similar to JakartaJS: Serverless in production

Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Workshop: AWS Lamda Signal Corps vs Zombies
Workshop: AWS Lamda Signal Corps vs ZombiesWorkshop: AWS Lamda Signal Corps vs Zombies
Workshop: AWS Lamda Signal Corps vs Zombies
Amazon Web Services
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads
Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
Fwdays
 
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesServerless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best Practices
Daniel Zivkovic
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
Tensult
 
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
Amazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
Amazon Web Services
 
Deep Dive on AWS Lambda
Deep Dive on AWS LambdaDeep Dive on AWS Lambda
Deep Dive on AWS Lambda
Amazon Web Services
 
以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端
Amazon Web Services
 
Introduction to AWS Lambda with Python
Introduction to AWS Lambda with PythonIntroduction to AWS Lambda with Python
Introduction to AWS Lambda with Python
adaplo
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
Amazon Web Services
 
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Amazon Web Services
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
Apigee | Google Cloud
 
Lambdaless and AWS CDK
Lambdaless and AWS CDKLambdaless and AWS CDK
Lambdaless and AWS CDK
MooYeol Lee
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
Amazon Web Services
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless Cloud
Ian Massingham
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
javier ramirez
 
The use of aws in the countryside
The use of aws in the countrysideThe use of aws in the countryside
The use of aws in the countryside
Takuya Tachibana
 

Similar to JakartaJS: Serverless in production (20)

Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Workshop: AWS Lamda Signal Corps vs Zombies
Workshop: AWS Lamda Signal Corps vs ZombiesWorkshop: AWS Lamda Signal Corps vs Zombies
Workshop: AWS Lamda Signal Corps vs Zombies
 
(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads(CMP403) AWS Lambda: Simplifying Big Data Workloads
(CMP403) AWS Lambda: Simplifying Big Data Workloads
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
"Плюси та мінуси впровадження AWS Lambda в проєкт" Віталій Григоришин
 
Serverless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best PracticesServerless Architectural Patterns & Best Practices
Serverless Architectural Patterns & Best Practices
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
AWS October Webinar Series - AWS Lambda Best Practices: Python, Scheduled Job...
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Deep Dive on AWS Lambda
Deep Dive on AWS LambdaDeep Dive on AWS Lambda
Deep Dive on AWS Lambda
 
以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端以AWS Lambda與Amazon API Gateway打造無伺服器後端
以AWS Lambda與Amazon API Gateway打造無伺服器後端
 
Introduction to AWS Lambda with Python
Introduction to AWS Lambda with PythonIntroduction to AWS Lambda with Python
Introduction to AWS Lambda with Python
 
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
AWS August Webinar Series - Building Serverless Backends with AWS Lambda and ...
 
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301Compute Without Servers – Building Applications with AWS Lambda - Technical 301
Compute Without Servers – Building Applications with AWS Lambda - Technical 301
 
Serverless computing with AWS Lambda
Serverless computing with AWS Lambda Serverless computing with AWS Lambda
Serverless computing with AWS Lambda
 
Lambdaless and AWS CDK
Lambdaless and AWS CDKLambdaless and AWS CDK
Lambdaless and AWS CDK
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
Getting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless CloudGetting Started with AWS Lambda & Serverless Cloud
Getting Started with AWS Lambda & Serverless Cloud
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
 
The use of aws in the countryside
The use of aws in the countrysideThe use of aws in the countryside
The use of aws in the countryside
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 

JakartaJS: Serverless in production

  • 4. WHAT And Why Serverless ? Serverless computing is a cloud-computing execution model in which the cloud provider runs the server, and dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. It can be a form of utility computing. *stolen shamelessly from wikipedia.
  • 6. WHAT And Why Serverless ? Run applications / functions without the hassle of managing the server infrastructure. It’s fully Managed!
  • 7. WHAT And Why Serverless Technologies Serverless Compute / Cloud Functions Backend as a Service etc...
  • 8. WHAT And Why Available Options Serverless Compute / Functions
  • 9. WHAT And Why JUST DO IT! We did some readings, but we quickly get our hands dirty with it.
  • 10. WHAT And Why JUST DO IT! OOPS.. We did some readings, but we quickly get our hands dirty with it. We found issues along the way though..
  • 11. WHAT And Why AWS Lambda? Functions and Events. Event triggers a function. Function is just a code that works. That’s it!
  • 12. WHAT And Why Sample Lambda Function
  • 13. WHAT And Why Why AWS Lambda ?
  • 14. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort.
  • 15. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed!
  • 16. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed! Pay per Use, Infinitely Scalable.
  • 17. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed! Pay per Use, Infinitely Scalable. Your budget.. Most likely not.
  • 18. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed! Pay per Use, Infinitely Scalable. Your budget.. Most likely not. Deliver values faster.
  • 19. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed! Pay per Use, Infinitely Scalable. Your budget.. Most likely not. Deliver values faster. Only care for the implementation code*. * Baca aturan pakai. Jika pusing berlanjut, jangan hubungi saya.
  • 20. WHAT And Why Why AWS Lambda ? Zero Provisioning Effort. Minimal ops and fully managed! Pay per Use, Infinitely Scalable. Your budget.. Most likely not. Deliver values faster. Only care for the implementation code*. Sleep. * Baca aturan pakai. Jika pusing berlanjut, jangan hubungi saya.
  • 23. WHAT Limitations 15 Minutes invocation time 30 Seconds API Gateway response And Why
  • 24. WHAT Limitations 15 Minutes invocation time 30 Seconds API Gateway response 250 MB package size And Why
  • 25. WHAT Limitations 15 Minutes invocation time 30 Seconds API Gateway response 250 MB package size No Persistence, such as DB pooling And Why
  • 26. WHAT Limitations 15 Minutes invocation time 30 Seconds API Gateway response 250 MB package size No Persistence, such as DB pooling Cold Starts (~0.5seconds in Js) And Why
  • 28. EXP Our Cases What we initially expect
  • 29. What we end up with EXP Our Cases
  • 30. Our Usage 150+ Lambda Functions (in TypeScript and Go) Easy to write! EXP Our Cases
  • 31. Our Cases Video Transcoding Long-running, Data Calculations Data Fetching Communication between Services EXP Our Cases
  • 32. Case #1: Video Transcoding 1. Admin is able to upload raw video 2. Service will transcode to multiple resolutions 3. Notify the admin when transcoding process finished EXP Our Cases
  • 33. Case #1: Video Transcoding EXP Our Cases S3 Bucket (Raw) User Uploads to S3 1 2
  • 34. Case #1: Video Transcoding EXP Our Cases S3 Bucket (Raw) Lambda Function User Uploads to S3 1 2 3
  • 35. Case #1: Video Transcoding EXP Our Cases S3 Bucket (Raw) Media Convert Lambda Function User Uploads to S3 1 2 3 4
  • 36. Case #1: Video Transcoding EXP Our Cases S3 Bucket (Raw) S3 Bucket Media Convert Lambda Function User Uploads to S3 1 2 3 45
  • 37. Case #1: Video Transcoding EXP Our Cases S3 Bucket (Raw) S3 Bucket Media Convert Lambda Function User Uploads to S3 Lambda Function For Notifications 1 2 3 45 6
  • 38. Case #2: Data Calculation 1. A scheduler which regularly fetches data from a certain data source 2. A service will do some data calculation based on the data source and write to another data store EXP Our Cases
  • 39. Case #2: Data Calculation EXP Our Cases Cloudwatch Event 1
  • 40. Case #2: Data Calculation EXP Our Cases Lambda FunctionCloudwatch Event 1 2
  • 41. Case #2: Data Calculation EXP Our Cases Lambda Function PostgreSQL on RDSCloudwatch Event 1 2 3
  • 42. Case #2: Data Calculation EXP Our Cases Lambda Function PostgreSQL on RDSCloudwatch Event 1 2 3 TIMEOUT!
  • 43. Case #2: Data Calculation Well, we can actually use a recursive for long running task, but we haven’t tried that method EXP Our Cases Lambda Function PostgreSQL on RDSCloudwatch Event 1 2 3 TIMEOUT!
  • 44. Case #3: Data Fetching 1. Front-End requests a data from API (REST or GraphQL) 2. Service will connect to database and return the data as response EXP Our Cases
  • 45. Case #3: Data Fetching EXP Our Cases Lambda Function 2 API Gateway 1
  • 46. Case #3: Data Fetching EXP Our Cases Lambda Function 2 API Gateway 1 PostgreSQL on RDS 3
  • 47. Case #3: Data Fetching EXP Our Cases Lambda Function 2 API Gateway 1 PostgreSQL on RDS 3 Cold Start! DB connections issue
  • 48. Case #4: Comms Between Services 1. Front End requests data to Service A 2. Service A will do a process, then calls Service B 3. Service B will be invoked and fetch data from Database 4. Return the response to Front End EXP Our Cases
  • 49. Case #4: Comms Between Services EXP Our Cases Lambda Function 2 API Gateway 1
  • 50. Case #4: Comms Between Services EXP Our Cases Lambda Function 2 API Gateway 1 API Gateway 3
  • 51. Case #4: Comms Between Services EXP Our Cases Lambda Function 2 API Gateway 1 API Gateway 3 Lambda Function 4
  • 52. Case #4: Comms Between Services EXP Our Cases Lambda Function 2 API Gateway 1 PostgreSQL on RDS 5 API Gateway 3 Lambda Function 4
  • 53. Case #4: Comms Between Services EXP Our Cases Lambda Function 2 API Gateway 1 PostgreSQL on RDS 5 API Gateway 3 Lambda Function 4 Network Latency!
  • 54. Cost Pay for API gateway and lambda execution. Slow functions = 💸🔥 EXP Our Cases API Gateway Lambda Function
  • 55. Cost Pay for API gateway and lambda execution. Extra wait time for functions = 💸🔥🔥🔥 EXP Our Cases
  • 56. Code Reusability: Shared Library We use shared library to reuse codes like utilities or helpers. Issue: Redeploy functions for each new versions. EXP Our Cases Lambda Function Lambda Function Lambda Function Shared Code (Library)
  • 57. Code Reusability: Service We use service to reuse codes as service with synchronous communication. Issue: network latency, obviously.. EXP Our Cases Lambda Function Lambda Function Lambda Function Shared Code (Lambda Function)
  • 58. Deployment Using Serverless Framework. You can use SAM template or Apex UP as well Tip: Watch out for your deployment bucket. You’ll fill up your S3 Bucket quickly if you do not set it. EXP Our Cases
  • 62. SUM Finally So, Are we still using serverless functions ? Yes, but not 100%. We moved some of the heavier workloads to AWS ECS (Elastic Container Service). Still serverless! Majority of others still remain in AWS Lambda
  • 63. SUM Finally Lesson Learned. We’re not the expert in Serverless technology, in this case, AWS Lambda. So we did things wrong in the past. We’re still improving!
  • 64. ENJOY YOUR PRODUCTIVE DAYS WITH SERVERLESS!

Editor's Notes

  1. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  2. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  3. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  4. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  5. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  6. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  7. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  8. Do a SQS queue to do a calculation on a lambda, which lastest for more than its limit.
  9. Do a SQS queue to do a calculation on a lambda, which lastest for more than its limit.
  10. Do a SQS queue to do a calculation on a lambda, which lastest for more than its limit.
  11. Do a SQS queue to do a calculation on a lambda, which lastest for more than its limit.
  12. Do a SQS queue to do a calculation on a lambda, which lastest for more than its limit.
  13. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email
  14. User uploads a file to AWS S3 using SDK. S3 then calls our lambda as trigger to start encoding queue. When the encoding ends, another lambda will send a notification email