舉報

會員
Building Serverless Python Web Services with Zappa
Serverlessapplicationsarebecomingverypopularthesedays,notjustbecausetheysavedevelopersthetroubleofmanagingtheservers,butalsobecausetheyprovideseveralotherbenefitssuchascuttingheavycostsandimprovingtheoverallperformanceoftheapplication.Thisbookwillhelpyoubuildserverlessapplicationsinaquickandefficientway.WebeginwithanintroductiontoAWSandtheAPIgateway,theenvironmentforserverlessdevelopment,andZappa.Wethenlookatbuilding,testing,anddeployingappsinAWSwiththreedifferentframeworks--Flask,Django,andPyramid.SettingupacustomdomainalongwithSSLcertificatesandconfiguringthemwithZappaisalsocovered.AfewadvancedZappasettingsarealsocoveredalongwithsecuringZappawithAWSVPC.Bytheendofthebookyouwillhavemasteredusingthreeframeworkstobuildrobustandcost-efficientserverlessappsinPython.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Chapter 12 Zappa with Docker
- Chapter 11 Securing Serverless Applications with Zappa
- Chapter 10 Advanced Zappa Settings
- Chapter 9 Asynchronous Task Execution on AWS Lambda
品牌:中圖公司
上架時間:2021-07-16 17:35:03
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-07-16 18:17:00
- Other Books You May Enjoy
- Chapter 12 Zappa with Docker
- Chapter 11 Securing Serverless Applications with Zappa
- Chapter 10 Advanced Zappa Settings
- Chapter 9 Asynchronous Task Execution on AWS Lambda
- Chapter 8 Custom Domain with SSL
- Chapter 7 Building a Falcon Application with Zappa
- Chapter 6 Building a Django REST API with Zappa
- Chapter 5 Building a Django Application with Zappa
- Chapter 4 Building a Flask-Based REST API with Zappa
- Chapter 3 Building a Flask Application with Zappa
- Chapter 2 Getting Started with Zappa
- Chapter 1 Amazon Web Services for Serverless
- Assessments
- Questions
- Summary
- Executing the API on AWS Lambda
- Configuring Docker with Zappa
- Building without Docker
- Building testing and deploying with Docker
- Executing in the local environment
- Implementing the /doc-parser API
- Prerequisites
- API development with a custom tool dependency
- Case study for this solution
- Proposed solution
- Problem statement
- Understanding Docker
- Technical requirements
- Zappa with Docker
- Questions
- Summary
- VPC configuration using Zappa
- Manual configuration of VPC
- Securing your Zappa application using AWS VPC
- Zappa configuration to enable AWS X-Ray support
- X-Ray manual integration with AWS Lambda
- Analyzing the Zappa application with AWS X-Ray
- Raising exceptions in the asynchronous Lambda function
- Automating DLQ configuration with Zappa
- Manual DLQ configuration
- Tracing AWS Lambda failure with dead letter queues
- API Gateway Lambda authorizer
- IAM policy
- Executing the API with the API key header
- Enabling the API Key
- Enabling secure endpoints on API Gateway
- Executing the API
- Deploying with Zappa
- Developing the random quote API
- Prerequisites
- Implementing a random quote API
- Technical requirements
- Securing Serverless Applications with Zappa
- Questions
- Summary
- Catching unhandled exceptions
- Enabling bash tab compilation
- Handling larger projects using Zappa
- Handling larger projects using the AWS Lambda console
- Handling larger projects
- Enabling CORS
- Keeping the server warm
- Technical requirements
- Advanced Zappa Settings
- Questions
- Summary
- Daily quote SMS unsubscription
- Daily quote SMS subscription
- The daily quote API
- Quote API execution
- Deployment
- Scheduling an event to publish an SMS
- Adding a custom domain with SSL
- Setting up environment variables
- Setting up the virtual environment
- Deploying and executing the Quote API using Zappa
- Implementing the SMS subscription functionality
- Configuring Amazon SNS using Boto3
- SMS subscription with Amazon SNS for the daily quote
- Configuring the Quote API application with async features
- Remote invocation
- Direct invocation
- Amazon SNS as the task source
- Asynchronous AWS Lambda invocation using the task decorator
- AWS Lambda asynchronous invocation using Zappa
- Asynchronous AWS Lambda execution using Boto3
- Understanding asynchronous execution
- Asynchronous execution
- Technical requirements
- Asynchronous Task Execution on AWS Lambda
- Questions
- Summary
- Random quote API
- Daily quote API
- Application execution with the configured domain
- Deploying to a domain with ACM certificate
- Integrating custom domain using Zappa
- Generating SSL certificate using Amazon Certificate Manager (ACM)
- What are SSL certificates?
- What is SSL?
- Generating SSL certificates using AWS Certificate Manager
- Changing nameservers to Route 53
- What is AWS Route 53?
- Configuring custom domain with AWS Route 53
- Technical requirements
- Custom Domain with SSL
- Questions
- Summary
- Scheduling an event to set the quote of the day
- Configuring events using Zappa
- Event scheduling
- Enabling caching on the API Gateway
- Random quote API execution
- Daily quote API execution
- Executing in the production environment
- Zappa deployment
- Zappa initialization
- Configuring Zappa
- API of the random quote
- API for the daily quote
- Local execution using gunicorn
- Building testing and deploying Falcon APIs using Zappa
- Creating API resources
- Mashape API integration
- Designing the model class
- Scaffolding the application
- Designing Falcon APIs
- What is Peewee?
- What is Falcon?
- Installing required packages
- Setting up the virtual environment
- Installing and configuring Falcon
- Technical requirements
- Building a Falcon Application with Zappa
- Questions
- Summary
- GET request on API /albums/
- Authentication API
- Executing in the production environment
- Building and deploying
- Configuring Zappa
- POST request on API "/albums/<album_id>/photos/"
- GET request on API "/albums/"
- API authentication
- Executing in the local environment
- Building testing and deploying Django app using Zappa
- Configuring the URL routes
- Implementing viewsets
- Implementing serializers
- Configuring django-rest-framework-jwt
- Implementing authentication and authorization
- Integrating the REST Framework
- What is the Django Rest Framework?
- Designing REST APIs
- Installing the required packages
- Installing and configuring the Django REST Framework
- Technical requirements
- Building a Django REST API with Zappa
- Questions
- Summary
- Django management command using Zappa
- Building and deploying
- Configuring Zappa
- Building testing and deploying the Django application using Zappa
- django-storage
- Standard configuration
- Setting up static and media files
- Creating CloudFront distributions
- Configuring the Amazon CloudFront CDN
- Application demonstration
- Integrating with the admin panel
- Implementing models
- Initializing the project
- Design overview
- Designing an image gallery application
- Configuring and installing packages
- Installing pipenv
- Setting up a virtual environment
- Installing and configuring Django
- Technical requirements
- Building a Django Application with Zappa
- Questions
- Summary
- Todo API with the authorization header
- Todo API without authorization
- Todo API
- Login API
- Sign up API
- Demonstrating the deployed application
- Initiating deployment using Zappa
- Configuring Zappa
- Building testing and deploying the REST API using Zappa
- Implementing the todo API
- Implementing authentication
- Configuring the application settings
- Designing the REST API
- Begining with REST
- Flask-RESTful
- Learning about JWT
- Flask-JWT
- Flask extensions
- Installing and configuring Flask
- Technical requirements
- Building a Flask-Based REST API with Zappa
- Questions
- Summary
- Deployment
- FLASK_APP
- Templates
- DELETE
- UPDATE
- RETRIEVE
- CREATE
- Views
- Forms
- Model
- Blueprint
- Todo
- Templates
- Views
- Forms
- Models
- Blueprint
- Authentication
- Base model
- Configuration
- Scaffolding
- Flask extensions
- Virtualenv
- Prerequisite
- A complete Flask Todo application
- Building testing and deploying on AWS Lambda
- Configuring with Zappa
- A minimal Flask application
- Installing Flask
- What is Flask?
- Technical requirements
- Building a Flask Application with Zappa
- Questions
- Summary
- Package
- Undeploy
- Rollback
- Tailing logs
- Status
- Update
- Initial deployments
- Basic uses
- Deploying and testing hello world
- The zappa_settings.json file
- Would you like to deploy the application globally? (default n)
- What's your modular path to your app function? (default dev)
- What do you want to call your bucket? (default zappa-2o2zd8dg4)
- What do you call this environment? (default dev)
- Building the deployment package
- Building testing and deploying a Python web service using Zappa
- Installing and configuring Zappa
- What is Zappa?
- Software
- Hardware
- Technical requirements
- Getting Started with Zappa
- Questions
- Summary
- Create-event-source-mapping
- Invoking the function
- Creating a Lambda function
- Configuring Lambda function with the AWS CLI
- Configuring the AWS CLI
- Installing the AWS CLI
- AWS Lambda interaction with theAWS CLI
- Serverless RESTful API
- Creating Lambda triggers
- Executing the Lambda function
- Monitoring
- Debugging and error handling
- Network
- Basic settings
- Execution role
- Tags
- Environment variables
- Function code
- Configuration
- How AWS Lambda works
- Getting started with AWS Lambda
- Transitioning from traditional server to serverless
- Technical requirements
- Amazon Web Services for Serverless
- Reviews
- Get in touch
- Conventions used
- Download the colour images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the author
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Dedication
- Building Serverless Python Web Services with Zappa
- Copyright and Credits
- Title Page
- 封面
- 封面
- Title Page
- Copyright and Credits
- Building Serverless Python Web Services with Zappa
- Dedication
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the author
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the colour images
- Conventions used
- Get in touch
- Reviews
- Amazon Web Services for Serverless
- Technical requirements
- Transitioning from traditional server to serverless
- Getting started with AWS Lambda
- How AWS Lambda works
- Configuration
- Function code
- Environment variables
- Tags
- Execution role
- Basic settings
- Network
- Debugging and error handling
- Monitoring
- Executing the Lambda function
- Creating Lambda triggers
- Serverless RESTful API
- AWS Lambda interaction with theAWS CLI
- Installing the AWS CLI
- Configuring the AWS CLI
- Configuring Lambda function with the AWS CLI
- Creating a Lambda function
- Invoking the function
- Create-event-source-mapping
- Summary
- Questions
- Getting Started with Zappa
- Technical requirements
- Hardware
- Software
- What is Zappa?
- Installing and configuring Zappa
- Building testing and deploying a Python web service using Zappa
- Building the deployment package
- What do you call this environment? (default dev)
- What do you want to call your bucket? (default zappa-2o2zd8dg4)
- What's your modular path to your app function? (default dev)
- Would you like to deploy the application globally? (default n)
- The zappa_settings.json file
- Deploying and testing hello world
- Basic uses
- Initial deployments
- Update
- Status
- Tailing logs
- Rollback
- Undeploy
- Package
- Summary
- Questions
- Building a Flask Application with Zappa
- Technical requirements
- What is Flask?
- Installing Flask
- A minimal Flask application
- Configuring with Zappa
- Building testing and deploying on AWS Lambda
- A complete Flask Todo application
- Prerequisite
- Virtualenv
- Flask extensions
- Scaffolding
- Configuration
- Base model
- Authentication
- Blueprint
- Models
- Forms
- Views
- Templates
- Todo
- Blueprint
- Model
- Forms
- Views
- CREATE
- RETRIEVE
- UPDATE
- DELETE
- Templates
- FLASK_APP
- Deployment
- Summary
- Questions
- Building a Flask-Based REST API with Zappa
- Technical requirements
- Installing and configuring Flask
- Flask extensions
- Flask-JWT
- Learning about JWT
- Flask-RESTful
- Begining with REST
- Designing the REST API
- Configuring the application settings
- Implementing authentication
- Implementing the todo API
- Building testing and deploying the REST API using Zappa
- Configuring Zappa
- Initiating deployment using Zappa
- Demonstrating the deployed application
- Sign up API
- Login API
- Todo API
- Todo API without authorization
- Todo API with the authorization header
- Summary
- Questions
- Building a Django Application with Zappa
- Technical requirements
- Installing and configuring Django
- Setting up a virtual environment
- Installing pipenv
- Configuring and installing packages
- Designing an image gallery application
- Design overview
- Initializing the project
- Implementing models
- Integrating with the admin panel
- Application demonstration
- Configuring the Amazon CloudFront CDN
- Creating CloudFront distributions
- Setting up static and media files
- Standard configuration
- django-storage
- Building testing and deploying the Django application using Zappa
- Configuring Zappa
- Building and deploying
- Django management command using Zappa
- Summary
- Questions
- Building a Django REST API with Zappa
- Technical requirements
- Installing and configuring the Django REST Framework
- Installing the required packages
- Designing REST APIs
- What is the Django Rest Framework?
- Integrating the REST Framework
- Implementing authentication and authorization
- Configuring django-rest-framework-jwt
- Implementing serializers
- Implementing viewsets
- Configuring the URL routes
- Building testing and deploying Django app using Zappa
- Executing in the local environment
- API authentication
- GET request on API "/albums/"
- POST request on API "/albums/<album_id>/photos/"
- Configuring Zappa
- Building and deploying
- Executing in the production environment
- Authentication API
- GET request on API /albums/
- Summary
- Questions
- Building a Falcon Application with Zappa
- Technical requirements
- Installing and configuring Falcon
- Setting up the virtual environment
- Installing required packages
- What is Falcon?
- What is Peewee?
- Designing Falcon APIs
- Scaffolding the application
- Designing the model class
- Mashape API integration
- Creating API resources
- Building testing and deploying Falcon APIs using Zappa
- Local execution using gunicorn
- API for the daily quote
- API of the random quote
- Configuring Zappa
- Zappa initialization
- Zappa deployment
- Executing in the production environment
- Daily quote API execution
- Random quote API execution
- Enabling caching on the API Gateway
- Event scheduling
- Configuring events using Zappa
- Scheduling an event to set the quote of the day
- Summary
- Questions
- Custom Domain with SSL
- Technical requirements
- Configuring custom domain with AWS Route 53
- What is AWS Route 53?
- Changing nameservers to Route 53
- Generating SSL certificates using AWS Certificate Manager
- What is SSL?
- What are SSL certificates?
- Generating SSL certificate using Amazon Certificate Manager (ACM)
- Integrating custom domain using Zappa
- Deploying to a domain with ACM certificate
- Application execution with the configured domain
- Daily quote API
- Random quote API
- Summary
- Questions
- Asynchronous Task Execution on AWS Lambda
- Technical requirements
- Asynchronous execution
- Understanding asynchronous execution
- Asynchronous AWS Lambda execution using Boto3
- AWS Lambda asynchronous invocation using Zappa
- Asynchronous AWS Lambda invocation using the task decorator
- Amazon SNS as the task source
- Direct invocation
- Remote invocation
- Configuring the Quote API application with async features
- SMS subscription with Amazon SNS for the daily quote
- Configuring Amazon SNS using Boto3
- Implementing the SMS subscription functionality
- Deploying and executing the Quote API using Zappa
- Setting up the virtual environment
- Setting up environment variables
- Adding a custom domain with SSL
- Scheduling an event to publish an SMS
- Deployment
- Quote API execution
- The daily quote API
- Daily quote SMS subscription
- Daily quote SMS unsubscription
- Summary
- Questions
- Advanced Zappa Settings
- Technical requirements
- Keeping the server warm
- Enabling CORS
- Handling larger projects
- Handling larger projects using the AWS Lambda console
- Handling larger projects using Zappa
- Enabling bash tab compilation
- Catching unhandled exceptions
- Summary
- Questions
- Securing Serverless Applications with Zappa
- Technical requirements
- Implementing a random quote API
- Prerequisites
- Developing the random quote API
- Deploying with Zappa
- Executing the API
- Enabling secure endpoints on API Gateway
- Enabling the API Key
- Executing the API with the API key header
- IAM policy
- API Gateway Lambda authorizer
- Tracing AWS Lambda failure with dead letter queues
- Manual DLQ configuration
- Automating DLQ configuration with Zappa
- Raising exceptions in the asynchronous Lambda function
- Analyzing the Zappa application with AWS X-Ray
- X-Ray manual integration with AWS Lambda
- Zappa configuration to enable AWS X-Ray support
- Securing your Zappa application using AWS VPC
- Manual configuration of VPC
- VPC configuration using Zappa
- Summary
- Questions
- Zappa with Docker
- Technical requirements
- Understanding Docker
- Problem statement
- Proposed solution
- Case study for this solution
- API development with a custom tool dependency
- Prerequisites
- Implementing the /doc-parser API
- Executing in the local environment
- Building testing and deploying with Docker
- Building without Docker
- Configuring Docker with Zappa
- Executing the API on AWS Lambda
- Summary
- Questions
- Assessments
- Chapter 1 Amazon Web Services for Serverless
- Chapter 2 Getting Started with Zappa
- Chapter 3 Building a Flask Application with Zappa
- Chapter 4 Building a Flask-Based REST API with Zappa
- Chapter 5 Building a Django Application with Zappa
- Chapter 6 Building a Django REST API with Zappa
- Chapter 7 Building a Falcon Application with Zappa
- Chapter 8 Custom Domain with SSL
- Chapter 9 Asynchronous Task Execution on AWS Lambda
- Chapter 10 Advanced Zappa Settings
- Chapter 11 Securing Serverless Applications with Zappa
- Chapter 12 Zappa with Docker
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-07-16 18:17:00