contents

preface

acknowledgments

about this book

about the authors

about the cover illustration

Part 1 First steps

1 Going serverless

1.1 What’s in a name?

1.2 Understanding serverless architectures

Service-oriented architecture and microservices

Implementing architecture the conventional way

Implementing architecture the serverless way

1.3 Making the call to go serverless

1.4 Serverless pros and cons

1.5 What’s new in this second edition?

2 First steps to serverless

2.1 Building a video-encoding pipeline

A quick note on AWS costs

Using Amazon Web Services (AWS)

2.2 Preparing your system

Setting up your system

Working with Identity and Access Management (IAM)

Let’s make a bucket

Creating an IAM role

Using AWS Elemental MediaConvert

Using MediaConvert Role

2.3 Starting with the Serverless Framework

Setting up the Serverless Framework

Bringing Serverless Framework to The 24-Hour Video

Creating your first Lambda function

2.4 Testing in AWS

2.5 Looking at logs

3 Architectures and patterns

3.1 Use cases

Backend compute

Internet of Things (IoT)

Data processing and manipulation

Real-time analytics

Legacy API proxy

Scheduled services

Bots and skills

Hybrids

3.2 Patterns

GraphQL

Command pattern

Messaging pattern

Priority queue pattern

Fan-out pattern

Compute as glue

Pipes and filters pattern

Part 2 Use cases

4 Yubl: Architecture highlights, lessons learned

4.1 The original Yubl architecture

Scalability problems

Performance problems

Long feature delivery cycles

Why serverless?

4.2 The new serverless Yubl architecture

Rearchitecting and rewriting

The new search API

4.3 Migrating to new microservices gracefully

5 A Cloud Guru: Architecture highlights, lessons learned

5.1 The original architecture

The journey to 43 microservices

What is GraphQL

Moving to GraphQL

Service discovery

Security in the BFF world

5.2 Remnants of the legacy

6 Yle: Architecture highlights, lessons learned

6.1 Ingesting events at scale with Fargate

Cost considerations

Performance considerations

6.2 Processing events in real-time

Kinesis Data Streams

SQS dead-letter queue (DLQ)

The Router Lambda function

Kinesis Data Firehose

Kinesis Data Analytics

Putting it altogether

6.3 Lessons learned

Know your service limits

Build with failure in mind

Batching is good for cost and efficiency

Cost estimation is tricky

Part 3 Practicum

7 Building a scheduling service for ad hoc tasks

7.1 Defining nonfunctional requirements

7.2 Cron job with EventBridge

Your scores

Our scores

Tweaking the solution

Final thoughts

7.3 DynamoDB TTL

Your scores

Our scores

Final thoughts

7.4 Step Functions

Your scores

Our scores

Tweaking the solution

Final thoughts

7.5 SQS

Your scores

Our scores

Final thoughts

7.6 Combining DynamoDB TTL with SQS

Your scores

Our scores

Final thoughts

7.7 Choosing the right solution for your application

7.8 The applications

Your weights

Our weights

Scoring the solutions for each application

8 Architecting serverless parallel computing

8.1 Introduction to MapReduce

How to transcode a video

Architecture overview

8.2 Architecture deep dive

Maintaining state

Step Functions

8.3 An alternative architecture

9 Code Developer University

9.1 Solution overview

Requirements listed

Solution architecture

9.2 The Code Scoring Service

Submissions Queue

Code Scoring Service summary

9.3 Student Profile Service

Update Student Scores function

9.4 Analytics Service

Kinesis Firehose

AWS Glue and Amazon Athena

QuickSight

Part 4 The future

10 Blackbelt Lambda

10.1 Where to optimize?

10.2 Before we get started

How a Lambda function handles requests

Latency: Cold vs. warm

Load generation on your function and application

Tracking performance and availability

10.3 Optimizing latency

Minimize deployment artifact size

Allocate sufficient resources to your execution environment

Optimize function logic

10.4 Concurrency

Correlation between requests, latency, and concurrency

Managing concurrency

11 Emerging practices

11.1 Using multiple AWS accounts

Isolate security breaches

Eliminate contention for shared service limits

Better cost monitoring

Better autonomy for your teams

Infrastructure-as-code for AWS Organizations

11.2 Using temporary stacks

Common AWS account structure

Use temporary stacks for feature branches

Use temporary stacks for e2e tests

11.3 Avoid sensitive data in plain text in environment variables

Attackers can still get in

Handle sensitive data securely

11.4 Use EventBridge in event-driven architectures

Content-based filtering

Schema discovery

Archive and replay events

More targets

Topology

appendix A Services for your serverless architecture

appendix B Setting up your cloud

appendix C Deployment frameworks

index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.102.114