Hands-On Serverless Applications with Go
eBook - ePub

Hands-On Serverless Applications with Go

Build real-world, production-ready applications with AWS Lambda

Mohamed Labouardy

Condividi libro
  1. 416 pagine
  2. English
  3. ePUB (disponibile sull'app)
  4. Disponibile su iOS e Android
eBook - ePub

Hands-On Serverless Applications with Go

Build real-world, production-ready applications with AWS Lambda

Mohamed Labouardy

Dettagli del libro
Anteprima del libro
Indice dei contenuti
Citazioni

Informazioni sul libro

Learn to build, secure, deploy, and manage your serverless application in Golang with AWS Lambda

Key Features

  • Implement AWS lambda to build scalable and cost-efficient applications in Go
  • Design and set the data flow between cloud services and custom business logic
  • Learn to design Lambda functions using real-world examples and implementation scenarios

Book Description

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.

What you will learn

  • Understand how AWS Lambda works and use it to create an application
  • Understand how to scaleup serverless applications
  • Design a cost-effective serverless application in AWS
  • Build a highly scalable and fault-tolerant CI/CD pipeline
  • Understand how to troubleshoot and monitor serverless apps in AWS
  • Discover the working of APIs and single page applications
  • Build a production-ready serverless application in Go

Who this book is for

This book is for Go developers who would like to learn about serverless architecture. Go programming knowledge is assumed. DevOps and Solution Architects who are interested in building serverless applications in Go can also choose this book.

Domande frequenti

Come faccio ad annullare l'abbonamento?
È semplicissimo: basta accedere alla sezione Account nelle Impostazioni e cliccare su "Annulla abbonamento". Dopo la cancellazione, l'abbonamento rimarrà attivo per il periodo rimanente già pagato. Per maggiori informazioni, clicca qui
È possibile scaricare libri? Se sì, come?
Al momento è possibile scaricare tramite l'app tutti i nostri libri ePub mobile-friendly. Anche la maggior parte dei nostri PDF è scaricabile e stiamo lavorando per rendere disponibile quanto prima il download di tutti gli altri file. Per maggiori informazioni, clicca qui
Che differenza c'è tra i piani?
Entrambi i piani ti danno accesso illimitato alla libreria e a tutte le funzionalità di Perlego. Le uniche differenze sono il prezzo e il periodo di abbonamento: con il piano annuale risparmierai circa il 30% rispetto a 12 rate con quello mensile.
Cos'è Perlego?
Perlego è un servizio di abbonamento a testi accademici, che ti permette di accedere a un'intera libreria online a un prezzo inferiore rispetto a quello che pagheresti per acquistare un singolo libro al mese. Con oltre 1 milione di testi suddivisi in più di 1.000 categorie, troverai sicuramente ciò che fa per te! Per maggiori informazioni, clicca qui.
Perlego supporta la sintesi vocale?
Cerca l'icona Sintesi vocale nel prossimo libro che leggerai per verificare se è possibile riprodurre l'audio. Questo strumento permette di leggere il testo a voce alta, evidenziandolo man mano che la lettura procede. Puoi aumentare o diminuire la velocità della sintesi vocale, oppure sospendere la riproduzione. Per maggiori informazioni, clicca qui.
Hands-On Serverless Applications with Go è disponibile online in formato PDF/ePub?
Sì, puoi accedere a Hands-On Serverless Applications with Go di Mohamed Labouardy in formato PDF e/o ePub, così come ad altri libri molto apprezzati nelle sezioni relative a Computer Science e Cloud Computing. Scopri oltre 1 milione di libri disponibili nel nostro catalogo.

Informazioni

Anno
2018
ISBN
9781789133837
Edizione
1

Assessments

Chapter 1: Go Serverless

  1. What are the advantages of using the serverless approach?
Answer:
    • NoOps: no management or configuration overhead and faster time to market.
    • Autoscaling and HA: enhanced scalability and elasticity based on load.
    • Cost-optimization: pay only for the compute time your consume.
    • Polygot: leverage the power of nanoservices architecture.
  1. What makes Lambda a time-saving approach?
Answer: You pay per execution and you don't pay for idle resources, while with EC2 instances, you pay also for unused resources.
  1. How does serverless architecture enable microservices?
Answer: Microservices is the approach of breaking down a monolithic application into a collection of smaller and modular services. Serverless computing is a key enabled for microservices-based applications. It makes infrastructure even-driven and completely controlled by the needs of each service that makes up an application. Moreover, serverless means functions, and a microservice is a set of functions.
  1. What is the maximum time limit for an AWS Lambda function?
Answer: By default, each Lambda function has a 3 seconds timeout; the maximum duration you can set, is 5 minutes.
  1. Which of the following are supported event-sources for AWS Lambda?
    • Amazon Kinesis Data Streams
    • Amazon RDS
    • AWS CodeCommit
    • AWS CloudFormation
Answer: Amazon Kinesis Data Streams, AWS CodeCommit and CloudFormation are supported event-sources for AWS Lambda. The list of all supported event sources can be found on the following url: https://docs.aws.amazon.com/lambda/latest/dg/invoking-lambda-function.html
  1. Explain what a goroutine is in Go. How can you stop goroutines?
Answer: A goroutine is lightweight thread; it uses a resource called channel to communicate. Channels, by design, prevent race conditions from happening when accessing shared memory using goroutines. To stop a goroutine, we pass signal channel. That signal channel is used to push a value. The goroutine polls that channel regularly. As soon as it detects a signal, it quits.
  1. What's Lambda@Edge in AWS?
Answer: Lambda@Edge allows you to run Lambda functions at the edge locations of CloudFront in order to customize the content returned to your end users at the lowest latency.
  1. What's the difference between Function as a Service and Platform as a Service?
Answer: Both PaaS and FaaS allow you to easily deploy an application and scale it without worrying about the underlying infrastructure. However, FaaS saves you money because you pay only for the compute time used to handle the incoming requests.
  1. What's an AWS Lambda cold start?
Answer: Cold start happens when a new event is triggered; AWS Lambda creates and initialize a new instance or container to handle the request, which takes longer (Startup latency) compared to warm starts, where the container is reused from a previous event.
  1. Can AWS Lambda functions be stateless or stateful?
Answer: Lambda functions must be stateless to leverage the power of autoscaling due to increasing rate of incoming events.

Chapter 2: Getting Started with AWS Lambda

  1. Which format is not supported by the AWS CLI?
    • JSON
    • Table
    • XML
    • Text
Answer: The support values are JSON, table, and text. The default output is JSON.
  1. Is it recommended to use the AWS root account for everyday interaction with AWS? If yes, why?
Answer: AWS root account has the ultimate authority to create and delete AWS resources, change the billing, and even close the AWS account. Hence, it is strongly recommended to create an IAM user for everyday tasks with only the needed permissions.
  1. What environment variables do you need to set to use the AWS CLI?
Answer: The following are the required environment variables to configure the AWS CLI:
    • AWS_ACCESS_KEY_ID
    • AWS_SECRET_ACCESS_KEY
    • AWS_DEFAULT_REGION
  1. How do you use the AWS CLI with named profiles?
Answer: AWS_PROFILE can be used to set the CLI profile to use. The profile is stored in the credentials file. By default, AWS CLI uses the default profile.
  1. Explain the GOPATH environment variable.
Answer: The GOPATH environment variable specifies the location of your Go workspace. Default value is $HOME/go.
  1. Which command-line command compiles a program in Go?
    • go build
    • go run
    • go fmt
    • go doc
Answer: The as-mentioned commands do the following:
    • build: It is a compile package and dependencies and generate a single binary.
    • run: It i...

Indice dei contenuti