KEMBAR78
Debugging AWS Lambda Performance Issues | PDF
Debugging AWS Lambda
Performance Issues
Yan Cui
http://theburningmonk.com
@theburningmonk
Developer Advocate @
Independent Consultant
AWS user since 2009
since 2018
yan@lumigo.io
Aviad Mor
@aviadmor
Co-Founder & CTO @
aviad@lumigo.io
observation
majority of performance problems originates from a function’s integration points
macro
how well is this service performing in general?
micro
why did this transaction perform poorly?
macro
how well is this service performing in general?
micro
why did this transaction perform poorly?
identify systemic
issues
macro
how well is this service performing in general?
micro
why did this transaction perform poorly?
why did this user
get a bad exp?
In control theory, observability is a measure of how well
internal states of a system can be inferred from knowledge
of its external outputs.
In control theory, observability is a measure of how well
internal states of a system can be inferred from knowledge
of its external outputs.
what do we need
to collect?
API Gateway Lambda DynamoDB
API Gateway Lambda DynamoDBhow long did this
req take?
what is the state
of the world?
In control theory, observability is a measure of how well
internal states of a system can be inferred from knowledge
of its external outputs.
what are the most
important outputs to
collect?
macro
how well is this service performing in general?
micro
why did this transaction perform poorly?
API Gateway API GatewayLambda Lambda DynamoDB
Service A Service B
API Gateway API GatewayLambda Lambda DynamoDB
Service A Service B
how long did service
B took to respond?
API Gateway API GatewayLambda Lambda DynamoDB
Service A Service B
how long did service
B took to respond?
was DynamoDB slow?
was it a cold start?
could it be API
Gateway?
How do we collect these external output to help us infer the
application’s internal state to debug performance issues?
log them manually
log them manually
turn these into metrics
using Metric Filter
Embedded Metric Format (EMF)
intercept all HTTP requests
X-Ray
Lumigo
DEMO!
API Gateway Lambda
GET /
Lambda
POST
/restaurants/search
API Gateway Lambda
GET /
get-index get-restaurants
search-restaurants
DynamoDB
EventBridge Lambda
notify-restaurant
Lambda
place-order
POST /order
SNS
github.com/theburningmonk/debugging-lambda-perf-issues-demo
get 15% off
@theburningmonk
theburningmonk.com
github.com/theburningmonk
yan@lumigo.io

Debugging AWS Lambda Performance Issues