Book Image

Hands-On Serverless Applications with Go

By : Mohamed Labouardy
Book Image

Hands-On Serverless Applications with Go

By: Mohamed Labouardy

Overview of this book

Serverless architecture is popular in the tech community due to AWS Lambda. Go is simple to learn, straightforward to work with, and easy to read for other developers; and now it's been heralded as a supported language for AWS Lambda. This book is your optimal guide to designing a Go serverless application and deploying it to Lambda. This book starts with a quick introduction to the world of serverless architecture and its benefits, and then delves into AWS Lambda using practical examples. You'll then learn how to design and build a production-ready application in Go using AWS serverless services with zero upfront infrastructure investment. The book will help you learn how to scale up serverless applications and handle distributed serverless systems in production. You will also learn how to log and test your application. Along the way, you'll also discover how to set up a CI/CD pipeline to automate the deployment process of your Lambda functions. Moreover, you'll learn how to troubleshoot and monitor your apps in near real-time with services such as AWS CloudWatch and X-ray. This book will also teach you how to secure the access with AWS Cognito. By the end of this book, you will have mastered designing, building, and deploying a Go serverless application.
Table of Contents (17 chapters)

To get the most out of this book

This book is written for anyone who work under Linux, Mac OS X, or Windows. You will need Go installed and an AWS account. You will also need Git in order to clone the repository with the source code provided with this book. Similarly, you are expected to have a basic knowledge of Go, the Bash command line, and some web programming skills. All prerequisites are described in the Chapter 2, Getting Started with AWS Lambda, with instructions to make sure you can follow this book with ease.

Last, keep in mind that this book is not intended to replace online resources, but rather aims to complement them. So you will obviously need internet access to complete your reading experience at some points, through provided links.

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/Hands-On-Serverless-Applications-with-Go. 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!

Download the color images

Conventions used

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text are shown as follows: "Within the workspace, create a main.go file using vim with the following content."

A block of code is set as follows:

package main
import "fmt"

func main(){
fmt.Println("Welcome to 'Hands-On serverless Applications with Go'")
}

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

pip install awscli

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: "On the Source page, select GitHub as the source provider."

Warnings or important notes appear like this.
Tips and tricks appear like this.