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.

管理程式對AWS LAMBDA持續交付

930 views

Published on

管理程式部署到多個AWS Lambda函數和更新您的API閘道,常可能需要手動管理,也使其顯得費時。

在 這個議程,我們將向您介紹如何使用AWS CodePipeline ,一個架構於Amazon內部的自動化持續交付,去部署pipeline到AWS Lambda 。我們將討論如何使用版本控制,使您能夠更好地管理你的開發工作流程(例如,開發,分期和生產)、Lambda函數和API閘道方法的不同變化。我們將演 練如何自動從您的開發應用程序的整個發行過程中,分期,最後到生產;在每個階段執行自動整合測試。

Published in: Technology
  • Login to see the comments

管理程式對AWS LAMBDA持續交付

  1. 1. AWS Cloud Kata for Start-Ups and Developers Taipei Managing the Continuous Delivery of Codes to AWS Lambda Pahud Hsieh
  2. 2. AWS Cloud Kata for Start-Ups and Developers What is AWS Lambda?
 Challenges in serverless development
 Environment pinning with API Gateway and Lambda
 Continuous delivery in different scenarios
 Best practices in security and development
 Demo Agenda
  3. 3. AWS Cloud Kata for Start-Ups and Developers A bit about me • IT Pro and developer for the past 16 years • Chief Architect from miiiCasa Inc. • Experienced in Serverless and ECS across multiple AWS regions • AWS all-5 certificates holder
  4. 4. AWS Cloud Kata for Start-Ups and Developers What is Lambda, actually? What is Lambda
  5. 5. AWS Cloud Kata for Start-Ups and Developers homegrown variant of Linux container with high speed of work routing and placement What is Lambda
  6. 6. AWS Cloud Kata for Start-Ups and Developers single/multiple instances monolithic applications What is Lambda
  7. 7. AWS Cloud Kata for Start-Ups and Developers https://twitter.com/adrianco/status/736553530689998848 What is Lambda
  8. 8. AWS Cloud Kata for Start-Ups and Developers API Function API Function API Function API Function API Function API Function API Function [micro] Application design in the cloud
  9. 9. AWS Cloud Kata for Start-Ups and Developers • Startup and termination • Freeze and thaw cycle Cold Start Terminate Freeze Thaw Handler Understanding Container Reuse
  10. 10. AWS Cloud Kata for Start-Ups and Developers Challenges in Serverless Development Challenges
  11. 11. AWS Cloud Kata for Start-Ups and Developers Local development and testing?
 Securing your credentials?
 Performance tuning and optimization?
 Continuous delivery?
 Language constraints?
 Challenges
  12. 12. AWS Cloud Kata for Start-Ups and Developers Continuous Delivery Continuous Delivery
  13. 13. AWS Cloud Kata for Start-Ups and Developers local dev/test end-to-end test update alias Fail publish Serverless Development Pipelines Log and Monitor Slack Analytics
  14. 14. AWS Cloud Kata for Start-Ups and Developers Environment Pinning with API Gateway and Lambda Continuous Delivery
  15. 15. AWS Cloud Kata for Start-Ups and Developers AWS Lambda CD Relevant Features
  16. 16. AWS Cloud Kata for Start-Ups and Developers Function Versions • Immutable versions of functions • Per version configuration • Per version cloudwatch metrics • Cloudwatch Logs with version attribute • Export/Download the codes
  17. 17. AWS Cloud Kata for Start-Ups and Developers Update Function Code • update function with local zip bundle • always update $LATEST version of your lambda function
  18. 18. AWS Cloud Kata for Start-Ups and Developers Publish Version • Publishes a version of your function from the current snapshot of $LATEST.
  19. 19. AWS Cloud Kata for Start-Ups and Developers Publish Version • update the function version to which the alias points.
  20. 20. AWS Cloud Kata for Start-Ups and Developers Update Alias $LATEST(95) STABLE TESTING 94 V 93 V 92
  21. 21. AWS Cloud Kata for Start-Ups and Developers Update Alias $LATEST(95) STABLE TESTING 94 V V 93 92
  22. 22. AWS Cloud Kata for Start-Ups and Developers API Gateway CD Relevant Features
  23. 23. AWS Cloud Kata for Start-Ups and Developers API Stages
  24. 24. AWS Cloud Kata for Start-Ups and Developers API Gateway stage variables
  25. 25. AWS Cloud Kata for Start-Ups and Developers API Gateway stage variables
  26. 26. AWS Cloud Kata for Start-Ups and Developers Access stage variables in Lambda
  27. 27. AWS Cloud Kata for Start-Ups and Developers Environment Pinning Table API Gateway Lambda Custom Domain /prod/Resources ReosurceManager:stable https://api.example.com /dev/Resources ReosurceManager: $LATEST https://dev.example.com /qa/Resources ReosurceManager:qa https://qa.example.com
  28. 28. AWS Cloud Kata for Start-Ups and Developers Continuous Delivery Scenarios
  29. 29. AWS Cloud Kata for Start-Ups and Developers AWS CodeCommit and CodePipeline with Lambda
 3rd Party Integrations Continuous Delivery Scenarios
  30. 30. AWS Cloud Kata for Start-Ups and Developers source S3/Github publish-to-Dev test-Dev release-Dev AWS Pipeline Integration PubNewVersion TestNewVersion RelNewVersion AddItem UpdateFunctionCode AddItemTest AddItemApiTest InvokeInvoke InvokeInvoke Invoke Invoke Invoke
  31. 31. AWS Cloud Kata for Start-Ups and Developers source Local Laptop 3rd party integration AddItem UpdateFunctionCode AddItemApiTest Invoke Invoke Invoke Runscope end-to-end testcallback
  32. 32. AWS Cloud Kata for Start-Ups and Developers Best Practices
  33. 33. AWS Cloud Kata for Start-Ups and Developers Securing your credentials
 Leverage the nature of container reuse
 Prewarm your Lambda functions Best Practices
  34. 34. AWS Cloud Kata for Start-Ups and Developers NEVER hardcode your credentials
  35. 35. AWS Cloud Kata for Start-Ups and Developers Use CredentialProviderChain in AWS-SDK https://gist.github.com/pahud/836481ae759147d3f493d3ead1f5406a
  36. 36. AWS Cloud Kata for Start-Ups and Developers Define in API Gateway stage variables Encrypt and save in AWS KMS Save in S3 with Server-Side Encryption For 3rd Party API Credentials
  37. 37. AWS Cloud Kata for Start-Ups and Developers Leverage Container Reuse
  38. 38. AWS Cloud Kata for Start-Ups and Developers • Startup and termination • Freeze and thaw cycle Cold Start Terminate Freeze Thaw Handler Understanding Container Reuse
  39. 39. AWS Cloud Kata for Start-Ups and Developers Show me the Codes!
  40. 40. AWS Cloud Kata for Start-Ups and Developers
  41. 41. AWS Cloud Kata for Start-Ups and Developers
  42. 42. AWS Cloud Kata for Start-Ups and Developers Cloudwatch Events Integration
  43. 43. AWS Cloud Kata for Start-Ups and Developers CloudWatch Events scheduled invocation
  44. 44. AWS Cloud Kata for Start-Ups and Developers chalice - python serverless microframework by AWS
 claudiajs - Deploy Node.js microservices to AWS easily
 serverless - Serverless Framework
 apex - Build, deploy, and manage AWS Lambda functions with ease (with Go support!)
 lambCI - Serverless continuous integration Resources and Takeaways
  45. 45. AWS Cloud Kata for Start-Ups and Developers Demo
  46. 46. AWS Cloud Kata for Start-Ups and Developers What’s next? A Hands-on Workshop 
 on AWS Infrastructure Services Date: Sep 29, 2016 AWS 10-Minute Tutorials “Hello, World!” technical documents to help you get hands-on with AWS.
  47. 47. AWS Cloud Kata for Start-Ups and Developers Thank You! @pahudnet

×