Building Serverless Applications with Python

Book description

Building efficient Python applications at minimal cost by adopting serverless architectures

About This Book
  • Design and set up a data flow between cloud services and custom business logic
  • Make your applications efficient and reliable using serverless architecture
  • Build and deploy scalable serverless Python APIs
Who This Book Is For

This book is for Python developers who would like to learn about serverless architecture. Python programming knowledge is assumed.

What You Will Learn
  • Understand how AWS Lambda and Microsoft Azure Functions work and use them to create an application
  • Explore various triggers and how to select them, based on the problem statement
  • Build deployment packages for Lambda functions
  • Master the finer details about building Lambda functions and versioning
  • Log and monitor serverless applications
  • Learn about security in AWS and Lambda functions
  • Scale up serverless applications to handle huge workloads and serverless distributed systems in production
  • Understand SAM model deployment in AWS Lambda
In Detail

Serverless architectures allow you to build and run applications and services without having to manage the infrastructure. Many companies have adopted this architecture to save cost and improve scalability. This book will help you design serverless architectures for your applications with AWS and Python.

The book is divided into three modules. The first module explains the fundamentals of serverless architecture and how AWS lambda functions work. In the next module, you will learn to build, release, and deploy your application to production. You will also learn to log and test your application. In the third module, we will take you through advanced topics such as building a serverless API for your application. You will also learn to troubleshoot and monitor your app and master AWS lambda programming concepts with API references. Moving on, you will also learn how to scale up serverless applications and handle distributed serverless systems in production.

By the end of the book, you will be equipped with the knowledge required to build scalable and cost-efficient Python applications with a serverless framework.

Style and approach

The book takes a pragmatic approach, using a real-world example to demonstrate building efficient, secure, and scalable serverless applications.

Publisher resources

View/Submit Errata

Table of contents

  1. Title Page
  2. Copyright and Credits
    1. Building Serverless Applications with Python
  3. Packt Upsell
    1. Why subscribe?
    2. PacktPub.com
  4. Contributors
    1. About the author
    2. About the reviewer
    3. Packt is searching for authors like you
  5. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
      1. Conventions used
    4. Get in touch
      1. Reviews
  6. The Serverless Paradigm
    1. Understanding serverless architectures
    2. Understanding microservices
    3. Serverless architectures don't have to be real-time only
    4. Pros and cons of serverless
    5. Summary
  7. Building a Serverless Application in AWS
    1. Triggers in AWS Lambda
    2. Lambda functions
    3. Functions as containers
    4. Configuring functions
    5. Testing Lambda functions
    6. Versioning Lambda functions
    7. Creating deployment packages
    8. Summary
  8. Setting Up Serverless Architectures
    1. S3 trigger
    2. SNS trigger
    3. SQS trigger
    4. CloudWatch trigger
    5. Summary
  9. Deploying Serverless APIs
    1. API methods and resources
    2. Setting up integration
    3. Deploying the Lambda function for API execution
    4. Handling authentication and user controls
    5. Summary
  10. Logging and Monitoring
    1. Understanding CloudWatch
    2. Understanding CloudTrail 
    3. Lambda’s metrics in CloudWatch
    4. Lambda's logs in CloudWatch
    5. Logging statements in Lambda
    6. Summary
  11. Scaling Up Serverless Architectures
    1. Third-party orchestration tools
    2. The creation and termination of servers
    3. Security best practices
    4. Identifying and handling difficulties in scaling
    5. Summary
  12. Security in AWS Lambda
    1. Understanding AWS Virtual Private Clouds (VPCs)
    2. Understanding subnets in VPCs
    3. Securing Lambda inside private subnets
    4. Controlling access to Lambda functions
    5. Using STS inside Lambda for secure session-based execution
    6. Summary
  13. Deploying a Lambda Function with SAM
    1. Introduction to SAM
    2. CloudFormation for serverless services
    3. Deploying with SAM
    4. Understanding security in SAM
    5. Summary
  14. Introduction to Microsoft Azure Functions
    1. Introduction to Microsoft Azure Functions
    2. Creating your first Azure Function
    3. Understanding triggers
    4. Understanding logging and monitoring in Azures Functions
    5. Best practices for writing Azure Functions
    6. Summary
  15. Other Books You May Enjoy
    1. Leave a review - let other readers know what you think

Product information

  • Title: Building Serverless Applications with Python
  • Author(s): Jalem Raj Rohit
  • Release date: April 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781787288676