Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

0

Share

Download to read offline

Debugging Lambda timeouts

Download to read offline

When a Lambda function times out, it’s one of the trickier problems to debug, especially if the function performs multiple IO calls. What was it doing when it timed out? And how do I identify these timeout errors quickly when Lambda lumps them together with other unhandled exceptions?

In this webinar, we will show you how to identify and debug timeout errors, and strategies for mitigating timeouts and degraded performance more gracefully when there are underlying issues.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Debugging Lambda timeouts

  1. 1. Debugging Lambda Timeouts
  2. 2. Yan Cui theburningmonk.com @theburningmonk Developer Advocate @ Independent Consultant AWS user since 2009 since 2018 yan@lumigo.io
  3. 3. “look for error logs”
  4. 4. Expectation
  5. 5. Reality
  6. 6. “could the function have timed out?”
  7. 7. what caused the function to time out?
  8. 8. signposts
  9. 9. missing signposts
  10. 10. timeouts are difficult to debug… mixed in with other errors no “error” log message relies on missing signposts to find root cause
  11. 11. How to detect Lambda timeouts How to mitigate/prevent timeouts How to find root cause of timeouts
  12. 12. How to detect Lambda timeouts
  13. 13. Easy to implement. Language agnostic. Reliable.
  14. 14. Easy to implement. Language agnostic. Reliable. Hard to scale as project grows. Can’t configure metric dimentions. Can’t use AWS/Lambda metric namespace.
  15. 15. CloudWatch CloudTrail EventBridge Lambda
  16. 16. https://amzn.to/2DYGYIn
  17. 17. Time START TIMED OUT
  18. 18. Time START TIMED OUT log timeout error
  19. 19. github.com/middyjs/middy
  20. 20. Error log message for timeouts.
  21. 21. Error log message for timeouts. Requires language specific implementation. Can report false positives.
  22. 22. It just works out-of-the-box. No manual instrumentation required. Yet another 3rd party solution.
  23. 23. How to debug Lambda timeouts
  24. 24. signposts
  25. 25. Easy to implement. Hard to scale as project grows. Only works for your code.
  26. 26. X-Ray
  27. 27. Automated tracing. Easy to find cause of timeout if after you fnid the transaction.
  28. 28. which are the errors/timeouts?
  29. 29. Automated tracing. Easy to find cause of timeout after you fnid the transaction. Still requires some manual instrumentation. Still difficult to find timeouts.
  30. 30. It just works out-of-the-box. No manual instrumentation required. More than just tracing. Yet another 3rd party solution.
  31. 31. How to mitigate/prevent timeouts
  32. 32. Step 1. timeout the operation before it times you out Step 2. execute fallback strategy
  33. 33. DEMO!
  34. 34. 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
  35. 35. 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 times out 1/4 times times out most of the time…
  36. 36. github.com/theburningmonk/debugging-lambda-timeouts-demo
  37. 37. get 25% off for 1st year
  38. 38. @theburningmonk theburningmonk.com github.com/theburningmonk yan@lumigo.io

When a Lambda function times out, it’s one of the trickier problems to debug, especially if the function performs multiple IO calls. What was it doing when it timed out? And how do I identify these timeout errors quickly when Lambda lumps them together with other unhandled exceptions? In this webinar, we will show you how to identify and debug timeout errors, and strategies for mitigating timeouts and degraded performance more gracefully when there are underlying issues.

Views

Total views

172

On Slideshare

0

From embeds

0

Number of embeds

1

Actions

Downloads

1

Shares

0

Comments

0

Likes

0

×