Serverless Microservices with AWS Lambda and API Gateway

Serverless Microservices with AWS Lambda and API Gateway

We'll talk about pros and cons of using serverless as well as microservices, and I'll demonstrate how to set it up with AWS Lambda and API Gateway.

Presented on js.la on 02/23/2018

Blog: https://AlexTamoykin.com
LinkedIn: https://www.linkedin.com/in/alextamoykin/
Twitter: https://twitter.com/fsproru
Video: https://www.youtube.com/watch?v=aeQLGe8d7kk

36b118e795c80c058d942b7af047ea67?s=128

Alexander Tamoykin

February 23, 2018
Tweet

Transcript

  1. SERVERLESS MICROSERVICES By AlexTamoykin.com

  2. ALEX TAMOYKIN Co-Founder, CTO @ Shuttle Finance Founder, CTO @

    The Right Balance Formerly: ATV/Dreamworks, Victorious, Zestfinance
  3. AGENDA WHY WHAT HOW

  4. WHY

  5. DEALING WITH SERVERS TAKES TIME

  6. SCALING SERVERS IS HARD AND EXPENSIVE

  7. MONOLITH DOESN’T SCALE

  8. WHAT SERVERLESS MICRO SERVICES

  9. DEPLOYMENT EVOLUTION PHYSICAL SERVERS VIRTUALIZATION FUNCTIONS

  10. SERVERLESS - NO SERVERS TO MANAGE - AUTOSCALING OUT OF

    THE BOX - PAY PER REQUEST TIME
  11. MICROSERVICES MONOLITH

  12. SERVERLESS MICROSERVICES The best of both words

  13. HOW

  14. CREATE A LAMBDA HANDLER module.exports.hello = (event, context, callback) =>

    { const response = { statusCode: 200, body: JSON.stringify({ message: 'Yay', input: event, }), }; callback(null, response); };
  15. LAMBDA TRIGGER

  16. TEMPLATIZE IT WITH SERVERLESS FRAMEWORK https://serverless.com

  17. SERVERLESS.YML functions: hello: handler: handler.hello events: - http: path: hello

    method: get
  18. $ SERVERLESS DEPLOY

  19. SERVERLESS MICROSERVICES HTTP S3 SNS SNS DynamoDB RDS SES

  20. SERVERLESS GOTCHAS ➤ FUNCTION EXECUTION IS CAPPED AT 5 MINUTES.

    ➤ FUNCTIONS CAN’T HOLD STATE. ➤ WARM UP TIMES. ➤ DEPLOYMENT PACKAGE LIMITS. ➤ TRY / CATCH EXCEPTIONS YOURSELF.
  21. ITERATE AND INNOVATE

  22. THANKS Blog: https://AlexTamoykin.com LinkedIn: https://www.linkedin.com/in/alextamoykin/ Twitter: https://twitter.com/fsproru