Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Building a Python Serverless Applications with AWS Chalice - AWS Online Tech Talks

1.832 Aufrufe

Veröffentlicht am

AWS Lambda makes it easy for you to run your code in the cloud, without managing servers. In this session, we will show you how to build a development pipeline for a serverless application using AWS Chalice and AWS Lambda. Using Chalice, we will show you how to author a Restful service, and deploying the application to multiple stages using AWS CodePipline, AWS CodeBuild and the Serverless Application Model. We will teach you how to test your code and troubleshoot issues. By the end of the session, you will have enough information to build a solid continuous delivery pipeline for your Python serverless application.

Building a Python Serverless Applications with AWS Chalice - AWS Online Tech Talks

  1. 1. © 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved. James Saryerwinnie, Senior Software Dev Engineer, AWS Dev Tools August 28, 2017 Building a Python Serverless Application with AWS Chalice
  2. 2. Getting started with Chalice Writing a sample application Deployment pipeline Agenda
  3. 3. Prerequisites Amazon API Gateway AWS Lambda
  4. 4. Getting started with Chalice Writing a sample application Deployment pipeline
  5. 5. GET / HTTP/1.1 {"hello": "world"} Amazon API Gateway AWS Lambda REST API
  6. 6. AWS IAM Role AWS LambdaAmazon API Gateway IAM Policy Swagger Document Deployment Package APIGateway.create_deployment() Lambda.add_permission() IAM.create_role()IAM.put_role_policy() APIGateway.import_rest_api() Lambda.create_function()
  7. 7. Introducing C h a l i c e Python framework for creating serverless APIs Declarative routing API CLI for deployment and packaging
  8. 8. Hello World from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} app.py
  9. 9. Hello World from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} app.py 1. App object
  10. 10. Hello World from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} app.py 1. App object 2. Routes
  11. 11. Hello World from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} app.py 1. App object 2. Routes 3. File
  12. 12. Hello World from chalice import Chalice app = Chalice(app_name='helloworld') @app.route('/') def index(): return {'hello': 'world'} app.py $ chalice deploy https://dfut7pnl47/api/
  13. 13. Demo
  14. 14. Getting started with Chalice Writing a sample application Deployment pipeline
  15. 15. Amazon API Gateway AWS Lambda REST API Amazon DynamoDB Sample Application
  16. 16. Application Lifecycle Local Dev Laptop
  17. 17. Application Lifecycle Amazon API Gateway AWS Lambda Local Dev Laptop Dev Stack
  18. 18. Application Lifecycle Amazon API Gateway AWS Lambda AWS CodePipeline Source Build Beta Prod Test Local Dev Laptop Dev Stack Full CD Pipeline
  19. 19. Application Lifecycle Amazon API Gateway AWS Lambda AWS CodePipeline Source Build Beta Prod Test Local Dev Laptop Dev Stack Full CD Pipeline
  20. 20. Demo
  21. 21. Getting started with Chalice Writing a sample application Deployment pipeline
  22. 22. Application Lifecycle Amazon API Gateway AWS Lambda AWS CodePipeline Source Build Beta Prod Test Local Dev Laptop Dev Stack Full CD Pipeline
  23. 23. Application Lifecycle Amazon API Gateway AWS Lambda AWS CodePipeline Source Build Beta Prod Test Local Dev Laptop Dev Stack Full CD Pipeline
  24. 24. AWS CodePipeline Continuous delivery service Automate your release process Establish a consistent release process
  25. 25. AWS CodeCommit Fully-managed source control service Secure and highly available private Git repos Works seamlessly with existing Git tools
  26. 26. AWS CodeBuild Fully managed build service Preconfigured build environments Integrates with AWS CodePipeline
  27. 27. AWS CloudFormation Infrastructure as code Organize and deploy a collection of AWS resources Integrates with AWS CodePipeline
  28. 28. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer
  29. 29. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer git push
  30. 30. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer Amazon S3 Object createsgit push
  31. 31. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer Amazon S3 Object createsgit push
  32. 32. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer SAM Template creates Amazon S3 Object createsgit push
  33. 33. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer SAM Template creates Amazon S3 Object createsgit push
  34. 34. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline Developer SAM Template creates AWS CloudFormation Stack creates Amazon S3 Object createsgit push
  35. 35. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline SAM Template creates AWS CloudFormation Stack creates Amazon S3 Object creates Source Build Beta
  36. 36. AWS CloudFormation AWS CodeCommit AWS CodeBuild AWS CodePipeline SAM Template creates AWS CloudFormation Stack creates Amazon S3 Object creates Source Build Beta
  37. 37. AWS Serverless Application Model Extends AWS CloudFormation with new resource types AWS::Serverless::Function AWS::Serverless::Api
  38. 38. Demo
  39. 39. Getting started with Chalice Writing a sample application Deployment pipeline
  40. 40. C h a l i c e CORS Amazon Cognito User Pools Local Dev Server Built-in Authorizers Scheduled Events Pure Lambda Functions Additional Features
  41. 41. Thanks! https://github.com/aws/chalice http://chalice.readthedocs.io/en/latest/ https://gitter.im/awslabs/chalice

×