Building serverless Python web services with Zappa build and deploy serverless applications on AWS using Zappa

Master serverless architectures in Python and their implementation, with Zappa on three different frameworks. Key Features Scalable serverless Python web services using Django, Flask, and Pyramid. Learn Asynchronous task execution on AWS Lambda and scheduling using Zappa. Implementing Zappa in a Doc...

Descripción completa

Detalles Bibliográficos
Otros Autores: Barguzar, Abdulwahid Abdulhaque, author (author)
Formato: Libro electrónico
Idioma:Inglés
Publicado: Birmingham : Packt 2018.
Edición:First edition
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009631586206719
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Dedication
  • Packt Upsell
  • Contributors
  • Table of Contents
  • Preface
  • Chapter 1: 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
  • Chapter 2: 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
  • Chapter 3: 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
  • Chapter 4: 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
  • Chapter 5: 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
  • Chapter 6: 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/&lt
  • album_id&gt
  • /photos/
  • Configuring Zappa
  • Building and deploying
  • Executing in the production environment
  • Authentication API
  • GET request on API /albums/
  • Summary
  • Questions
  • Chapter 7: 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
  • Chapter 8: 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
  • Chapter 9: 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
  • Chapter 10: 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
  • Chapter 11: 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
  • Chapter 12: 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
  • Other Books You May Enjoy
  • Index.