售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
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
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜