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

Buch teilen
  1. 416 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Hands-On Serverless Applications with Go

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

Mohamed Labouardy

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Hands-On Serverless Applications with Go als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Hands-On Serverless Applications with Go von Mohamed Labouardy im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Cloud Computing. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2018
ISBN
9781789133837

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...

Inhaltsverzeichnis