Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

SRV207 Orchestrating AWS Lambda with Step Functions

395 visualizaciones

Publicado el

You’ve built an AWS Lambda function. But an application is more than just a single function; you need a lot of them. How do you orchestrate them? How do you know they’re performant? In this session, I’ll get you started with AWS Lambda, AWS Step Functions, and monitoring to get your application up and running. This session is brought to you by AWS Partner, Datadog.

  • Visit this site: tinyurl.com/sexinarea and find sex in your area for one night)) You can find me on this site too)
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Sex in your area for one night is there tinyurl.com/hotsexinarea Copy and paste link in your browser to visit a site)
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Girls for sex are waiting for you https://bit.ly/2TQ8UAY
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Meetings for sex in your area are there: https://bit.ly/2TQ8UAY
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí
  • Best site for flirting and sex in your area you can find there: https://bit.ly/2SlcOnO
       Responder 
    ¿Estás seguro?    No
    Tu mensaje aparecerá aquí

SRV207 Orchestrating AWS Lambda with Step Functions

  1. 1. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Matt Williams – Evangelist @ Datadog SRV207 Orchestrating AWS Lambda with AWS Step Functions
  2. 2. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  3. 3. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  4. 4. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  5. 5. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  6. 6. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist
  7. 7. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist
  8. 8. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Who am I Matt Williams Evangelist at Datadog @technovangelist mattw@datadoghq.com Organizer of DevOps Days Boston 2017 & 2018
  9. 9. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Who is Datadog SaaS-based Monitoring & Analytics Infrastructure, APM, Logs Open Source Agent Trillions of data points per day
  10. 10. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. I often like to talk about AWS Lambda …
  11. 11. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist AWS Lambda
  12. 12. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  13. 13. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  14. 14. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  15. 15. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  16. 16. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  17. 17. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  18. 18. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  19. 19. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  20. 20. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  21. 21. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  22. 22. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  23. 23. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  24. 24. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  25. 25. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  26. 26. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  27. 27. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  28. 28. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. That’s pretty cool right? But not perfect. You still have to configure everything else • Amazon S3 • Amazon DynamoDB • Amazon API Gateway • Etc. SAM AWS CloudFormation Serverless Framework @technovangelist
  29. 29. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist AWS Lambda
  30. 30. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. … but AWS Lambda! = Amazon EC2 @technovangelist
  31. 31. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. … but AWS Lambda! = An application @technovangelist
  32. 32. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Applications are complicated @technovangelist
  33. 33. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Lambda functions should respect the single responsibility principle … @technovangelist
  34. 34. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  35. 35. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist AWS Lambda
  36. 36. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist
  37. 37. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist We can create many serverless functions
  38. 38. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist We can create many serverless functions But how do we orchestrate them?
  39. 39. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Event/Message/Database as Traffic Cop Amazon Kinesis Amazon SQS Amazon DynamoDB @technovangelist
  40. 40. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. https://github.com/Nordstrom/hello-retail
  41. 41. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  42. 42. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Enter AWS Step Functions @technovangelist
  43. 43. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. A step function is … @technovangelist
  44. 44. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. A step function is … a state machine @technovangelist
  45. 45. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist But what about Amazon Simple Workflow Service (Amazon SWF)?
  46. 46. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Step Function Concepts • State machine • States • Task • Choice • Succeed/Fail • Pass • Wait • Parallel • Executions • Transitions You define the state machine with the Amazon States Language A diagram will be generated based on that structure @technovangelist
  47. 47. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved.
  48. 48. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Task @technovangelist
  49. 49. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Choice @technovangelist
  50. 50. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Succeed/Fail @technovangelist
  51. 51. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Pass @technovangelist
  52. 52. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Wait @technovangelist
  53. 53. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. State Example: Parallel @technovangelist
  54. 54. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Many Ways to Build Step Functions I used Serverless Framework @technovangelist
  55. 55. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Benefits of Serverless Framework Define everything in a single file: • IAM role statements • Lambda function handlers • Lambda function triggers • Step Function states • AWS CloudFormation for other things @technovangelist
  56. 56. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Amazon ECR AWS Lambda Amazon S3 Amazon DynamoDB Amazon CloudFront AWS CodeBuild AWS CodeCommit AWS CloudFormation IAM Amazon API Gateway* AWS Step Functions Amazon SNS @technovangelist
  57. 57. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  58. 58. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. AWS Lambda Amazon S3 Amazon API Gateway AWS Step Functions AWS Lambda Amazon DynamoDB AWS Lambda AWS CodeBuild @technovangelist
  59. 59. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. @technovangelist
  60. 60. @technovangelist
  61. 61. @technovangelist
  62. 62. @technovangelist
  63. 63. @technovangelist
  64. 64. @technovangelist
  65. 65. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. 1.Use ML to figure out which slide 2.Is this slide different than the last time? 3.If so, pull slide data from Dynamo 4.If slide different then create document in Amazon S3 5.Build the site 6.Wait for it 1.Is it built 7.Done @technovangelist
  66. 66. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Type: Task Resource: Lambda function @technovangelist
  67. 67. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist
  68. 68. @technovangelist
  69. 69. @technovangelist
  70. 70. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Type: Task Resource: Lambda function @technovangelist
  71. 71. @technovangelist
  72. 72. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. @technovangelist
  73. 73. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Type: Task Resource: Lambda function @technovangelist
  74. 74. @technovangelist
  75. 75. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Type: Task Resource: Lambda function @technovangelist
  76. 76. @technovangelist
  77. 77. @technovangelist
  78. 78. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. How About Monitoring? We monitor Lambda via logs MONITORING|unix_epoch_timestamp|value|count| my.metric.name|#tag1:value,tag2 console.log(monitoringstring); @technovangelist
  79. 79. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What Are the Lambda Metrics aws.lambda.duration, min, max, sum aws.lambda.errors aws.lambda.invocations aws.lambda.throttles aws.lambda.iterator_age @technovangelist
  80. 80. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. What Are the Step Function Metrics aws.states.execution_time (.maximum, .minimum) aws.states.executions_aborted, failed, started, succeeded, timed_out aws.states.lambda_functions_scheduled, started, succeeded, timed_out aws.states.execution_throttled aws.states.lambda_function_time (.maximum, .minimum) aws.states.lambda_function_run_time (.maximum, .minimum) aws.states.lambda_function_schedule_time (.maximum, .minimum) aws.states.lambda_functions_started @technovangelist
  81. 81. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Summary Step Functions make AWS Lambda orchestration easy Lambda, Serverless, and Step Functions can be an interesting part of your infrastructure Monitor your Lambda functions to ensure peak performance Source can be found at: https://github.com/DataDog/mattw-reinvent2017-demo @technovangelist
  82. 82. © 2018, Amazon Web Services, Inc. or Its Affiliates. All rights reserved. Matt Williams Evangelist at Datadog @technovangelist mattw@datadoghq.com Organizer of DevOps Days Boston 2017 & 2018
  83. 83. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Please complete the session survey in the summit mobile app.
  84. 84. Submit Session Feedback 1. Tap the Schedule icon. 2. Select the session you attended. 3. Tap Session Evaluation to submit your feedback.
  85. 85. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved. Thank you!

×