Preface
Serverless engineering is a new domain of engineering that allows developers to write code and deploy infrastructures without having to worry about maintaining servers. This book explains the concepts of serverless engineering with Python examples on cloud architectures.
Who this book is for
This book is for Python developers who would like to learn about serverless architectures in cloud-based platforms such as Azure and Amazon Web Services (AWS). Python programming knowledge is assumed.
What this book covers
Chapter 1, The Serverless Paradigm, introduces the reader to the concepts of microservices and serverless architectures, and provides a clear understanding of the pros and cons.
Chapter 2, Building a Serverless Application in AWS, covers AWS Lambda and explains the concepts, workings, and the components involved in the tool in detail. It also explains the nuances involved in security, user controls, and versioning code inside Lambda.
Chapter 3, Setting Up Serverless Architectures, goes into further detail about the various triggers in AWS Lambda and how they integrate with the functions. The reader will learn what the event structure of each trigger will look like and how to modify the Lambda function with respect to the type of trigger used.
Chapter 4, Deploying Serverless APIs, explores the AWS API Gateway and also teaches the reader how to build efficient, scalable serverless APIs using the API Gateway and Lambda. It goes on to teach the reader how to improve the API by adding authorization and how to set up user-level controls such as throttling of requests.
Chapter 5, Logging and Monitoring, presents the concept of logging and monitoring in serverless applications. This is mostly still an unsolved problem in this domain. This chapter guides the reader through setting up logging and monitoring in the AWS environment with Python via custom metrics and logging. This chapter also goes into the details of best practices when it comes to logging and monitoring Lambda functions in Python.
Chapter 6, Scaling Up Serverless Architectures, discusses the practice of scaling up serverless architectures for large workloads using several third-party tools. This chapter also teaches the reader how to handle security, logging, and monitoring using the available Python modules.
Chapter 7, Security in AWS Lambda, teaches readers to deploy secure serverless applications by leveraging the AWS security features available. This involves having strict controls on components that the application can access, on the users who can handle or access the application, and so on. This also involves understanding AWS virtual private clouds and subnets for an in-depth understanding of the security features and best practices you can follow in AWS Lambda.
Chapter 8, Deploying a Lambda Function with SAM, looks at how to deploy Lambda functions as infrastructure as code via the Serverless Application Model, which is a new way of writing and deploying Lambda functions that makes it easier to integrate with other IaaS services, such as CloudFormation.
Chapter 9, Introduction to Microsoft Azure Functions, familiarizes the reader with Microsoft Azure Functions, and explains how to configure and understand the components of the tool.
To get the most out of this book
The reader should be comfortable with the Python programming language. So, prior experience with it is expected. Prior experience with cloud-based systems will also be helpful.
Conventions used
There are a number of text conventions used throughout this book.
CodeInText
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "It is to be noted that the meta information should always be included for all SAM, which includes AWSTemplateFormatVersion
and Transform
. This would tell CloudFormation
that the code you have written is an AWS SAM code and a serverless application."
A block of code is set as follows:
AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31
Bold: Indicates a new term, an important word, or words that you see onscreen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "For creating a function, you need to click on the orange Create a function
button on the right."
Note
Warnings or important notes appear like this.
Note
Tips and tricks appear like this.
Get in touch
Feedback from our readers is always welcome.
General feedback: Email [email protected]
and mention the book title in the subject of your message. If you have questions about any aspect of this book, please email us at [email protected]
.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you would report this to us. Please visit www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details.
Piracy: If you come across any illegal copies of our works in any form on the Internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected]
with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit authors.packtpub.com.
Reviews
Please leave a review. Once you have read and used this book, why not leave a review on the site that you purchased it from? Potential readers can then see and use your unbiased opinion to make purchase decisions, we at Packt can understand what you think about our products, and our authors can see your feedback on their book. Thank you!
For more information about Packt, please visit packtpub.com.