$30 off During Our Annual Pro Sale. View Details »

Serverless APIs in Javascript

Serverless APIs in Javascript

Talk giving at BarcelonaJS Meetup on June 22nd 2016.

It gives an overview of serverless principles, and gives a special demo of AWS Lambda solution using Serverless framwework.

Nicolas Grenié

June 22, 2016
Tweet

More Decks by Nicolas Grenié

Other Decks in Technology

Transcript

  1. Build and manage Serverless API Nicolas Grenié Hacker in Residence

    at 3scale @picsoung BarcelonaJS 22nd June 2016
  2. @picsoung

  3. 3scale.net/jobs

  4. 700+ clients worldwide billions of API calls per month

  5. None
  6. None
  7. There is hope hype

  8. http://www.commitstrip.com/en/2013/03/11/de-lestimation-de-la-charge/ by CommitStrip

  9. common questions you usually ask yourself

  10. on prem vs cloud

  11. how much storage

  12. how much database

  13. how much server power

  14. None
  15. None
  16. Welcome to serverless era

  17. no servers no deployments on servers no software to install

  18. build once scale later

  19. event driven functions

  20. FaaS

  21. Fonctions as a Service

  22. action reaction

  23. serverless is 2016 PaaS

  24. actors Google
 CLOUD FUNCTIONS ALPHA

  25. frameworks

  26. 101

  27. pay per use logs with CloudWatch node, python, Java auto-scale

    AWS Lambda
  28. Demo

  29. community project AWS Lambda node and python handle roles minify

    code
  30. $ sls project create

  31. project structure s-project.json // project and author data s-resources-cf.json //

    CloudFormation template for all stages/regions admin.env // AWS Profiles - gitignored _meta // meta data that holds stage/regions config and // variables - gitignored |__resources // final CF templates for each stage/region |__s-resources-cf-dev-useast1.json |__variables // variables specific to stages and regions |__s-variables-common.json |__s-variables-dev.json |__s-variables-dev-useast1.json
  32. $sls function create

  33. project structure s-project.json // project and author data s-resources-cf.json //

    CloudFormation template for all stages/regions admin.env // AWS Profiles - gitignored _meta // meta data that holds stage/regions config and // variables - gitignored |__resources // final CF templates for each stage/region |__s-resources-cf-dev-useast1.json |__variables // variables specific to stages and regions |__s-variables-common.json |__s-variables-dev.json |__s-variables-dev-useast1.json restAPI // folder to group your project functions |__greetings // your first function |__event.json // sample event for testing function locally |__handler.js // your function handler file |__s-function.json // data for your lambda function, endpoints and event sources
  34. $ sls function run

  35. $ sls dash deploy

  36. Use it for {API} ! AWS ecosystem

  37. Manage the API

  38. Manage the API simple API key no self-service no throttling

    by key no segmentation
  39. 3scale API management

  40. 3scale API management reduce latency not in the code deploy

    with cloudformation throttling by key support more auth protocol
  41. Takeaways serverless = agility cost effective lot of platforms/tools serverless

    API need to be managed
  42. Build and manage Serverless API Nicolas Grenié Hacker in Residence

    at 3scale @picsoung BarcelonaJS 22nd June 2016