Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Serverless Design Patterns and Best Practices

You're reading from   Serverless Design Patterns and Best Practices Build, secure, and deploy enterprise ready serverless applications with AWS to improve developer productivity

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788620642
Length 260 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Brian Zambrano Brian Zambrano
Author Profile Icon Brian Zambrano
Brian Zambrano
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Introduction FREE CHAPTER 2. A Three-Tier Web Application Using REST 3. A Three-Tier Web Application Pattern with GraphQL 4. Integrating Legacy APIs with the Proxy Pattern 5. Scaling Out with the Fan-Out Pattern 6. Asynchronous Processing with the Messaging Pattern 7. Data Processing Using the Lambda Pattern 8. The MapReduce Pattern 9. Deployment and CI/CD Patterns 10. Error Handling and Best Practices 11. Other Books You May Enjoy

To get the most out of this book

  1. Almost all of the examples in this book use the Serverless Framework to manage AWS resources and Lambda functions. Installation instructions for the Serverless Framework can be found at https://serverless.com/framework/docs/getting-started/.

  2. In addition to the Serverless Framework, readers will need to have an AWS account to run the examples. For those new to AWS, you can create a new account, which comes with a year of usage in their Free Tier, at https://aws.amazon.com.

    During the course of this book, you will need the following tools:

    • AWS Lambda
    • AWS RDS
    • AWS API Gateway
    • AWS DynamoDB
    • AWS S3
    • AWS SQS
    • AWS Rekognition
    • AWS Kinesis
    • AWS SNS

    We will learn how to use these tools through the course of this book.

Download the example code files

You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at www.packtpub.com.
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Serverless-Design-Patterns-and-Best-Practices. In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!

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: "To test this, we need to set the timeout of the divide function to 4 seconds and put a time.sleep(3) in the middle of the application code."

A block of code is set as follows:

def divide(event, context):
params = event.get('queryStringParameters') or {}
numerator = int(params.get('numerator', 10))
denominator = int(params.get('denominator', 2))
body = {
"message": "Results of %s / %s = %s" % (
numerator,
denominator,
numerator // denominator,
)
}

response = {
"statusCode": 200,
"body": json.dumps(body)
}

return response

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

from raven_python_lambda import RavenLambdaWrapper

@RavenLambdaWrapper()
from raven_python_lambda import RavenLambdaWrapper

@RavenLambdaWrapper()
def divide(event, context):
# Code

Any command-line input or output is written as follows:

$ curl "https://5gj9zthyv1.execute-api.us-west-2.amazonaws.com/dev?numerator=12&denominator=3"
{"message": "Results of 12 / 3 = 4"}

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: "The following screenshot shows Invocation errors from the AWS Lambda monitoring page for the divide function:"

Warnings or important notes appear like this.
Tips and tricks appear like this.
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at R$50/month. Cancel anytime