Save 37% off PRO during our Black Friday Sale! »

Getting Serverless into Production Faster

Getting Serverless into Production Faster

Presentation from the SLIC Starter workshop at the AWS UG and Serverless UG Warsaw, Poland workshop, 19th September 2019.

43f9d2a530cd32d7d8622e9f3e533e40?s=128

Eoin Shanaghy

September 19, 2019
Tweet

Transcript

  1. Getting Serverless into Production Faster Eoin Shanaghy @eoins

  2. • Next generation (serverless) cloud architecture • Machine Learning •

    Platform modernisation
  3. aiasaservicebook.com 40% Code: mtpaws19 @eoins !

  4. slic.app OPEN SOURCE

  5. # Fork fourTheorem/slic-starter.git # Node 8 npm install –g serverless@0.51

    Getting Ready...
  6. Account Setup # Account credentials (AWS_...) cp slic-config.json.sample slic-config.json #

    1. Edit accountIds # 2. Remove nsDomain # 3. Configure siteBucketPrefix
  7. GitHub Personal Access Token aws codebuild import-source-credentials -- generate-cli-skeleton >

    /tmp/skeleton.json # Change serverType to GITHUB # Change authType to PERSONAL_ACCESS_TOKEN # Delete username aws codebuild import-source-credentials --cli- input-json file:///tmp/skeleton.json
  8. CI/CD IAM Role cd cicd/cross-account Sls deploy

  9. CI/CD Deployment cd cicd npm install npm run build npm

    run cdk –bootstrap npm run deploy
  10. The Problem with Serverless

  11. The Solution 1. Put all best practices together 2. Make

    opinionated decisions 3. Starter, not a framework 4. Replicate production environment 5. Make it open source 6. Continuously deploy
  12. SLIC Starter Production-grade application in 1 day Save months of

    pain
  13. None
  14. None
  15. None
  16. None
  17. None
  18. AWS Only!

  19. Multiple Accounts

  20. None
  21. Multiple Accounts

  22. Serverless Framework CDK

  23. CDK

  24. CDK

  25. Cloud Native CD

  26. None
  27. Configure SSM Parameters cp util/ssm-params-template.json /tmp/ssm- params.json util/create-ssm-params.js /tmp/ssm-params.json rm

    /tmp/ssm-params.json
  28. Trigger a build! # Edit README.md git add README.md git

    commit –m “Trigger a build!” git push
  29. API Tests E2E Tests • Mock Amplify / Cognito Login

    • Mailosaur
  30. None
  31. Local Development

  32. fuge.io serverless offline sls invoke local Localstack

  33. Users and Accounts Amplify SDK Cognito User Pool

  34. Events

  35. Kinesis CloudWatch Events SQS

  36. Front End

  37. Amplify SDK React Redux Material UI S3 CloudFront

  38. Logging

  39. None
  40. None
  41. Tracing

  42. AWS X-Ray

  43. Roadmap

  44. Roadmap üQuick start local development üSingle account üBetter IAM story

    üMonitoring üFeature branch deployments üPermissions and access control üReal time event processing üAnalytics
  45. Thank You eoin.shanaghy@fourtheorem.com @eoins