preface |
|
xiii | |
acknowledgments |
|
xv | |
About this Book |
|
xviii | |
About the Authors |
|
xx | |
About the Cover Illustration |
|
xxii | |
|
|
1 | (54) |
|
|
3 | (15) |
|
|
4 | (1) |
|
1.2 Understanding serverless architectures |
|
|
5 | (6) |
|
Service-oriented architecture and microservices |
|
|
7 | (1) |
|
Implementing architecture the conventional way |
|
|
7 | (2) |
|
Implementing architecture the serverless way |
|
|
9 | (2) |
|
1.3 Making the call to go serverless |
|
|
11 | (3) |
|
1.4 Serverless pros and cons |
|
|
14 | (2) |
|
1.5 What's new in this second edition? |
|
|
16 | (2) |
|
2 First steps to serverless |
|
|
18 | (22) |
|
2.1 Building a video-encoding pipeline |
|
|
19 | (2) |
|
A quick note on AWS costs |
|
|
19 | (1) |
|
Using Amazon Web Services (AWS) |
|
|
20 | (1) |
|
2.2 Preparing your system |
|
|
21 | (8) |
|
|
22 | (1) |
|
Working with Identity and Access Management (JAM) |
|
|
22 | (3) |
|
|
25 | (1) |
|
|
26 | (2) |
|
Using AWS Elemental MediaConvert |
|
|
28 | (1) |
|
|
29 | (1) |
|
2.3 Starting with the Serverless Framework |
|
|
29 | (7) |
|
Setting up the Serverless Framework |
|
|
29 | (2) |
|
Bringing Serverless Framework to The 24-Hour Video |
|
|
31 | (2) |
|
Creating your first Lambda function |
|
|
33 | (3) |
|
|
36 | (1) |
|
|
37 | (3) |
|
3 Architectures and patterns |
|
|
40 | (15) |
|
|
40 | (5) |
|
|
41 | (1) |
|
|
41 | (1) |
|
Data processing and manipulation |
|
|
42 | (1) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
44 | (1) |
|
|
45 | (10) |
|
|
45 | (1) |
|
|
46 | (1) |
|
|
47 | (2) |
|
|
49 | (1) |
|
|
50 | (1) |
|
|
51 | (1) |
|
Pipes and filters pattern |
|
|
52 | (3) |
|
|
55 | (42) |
|
4 Yubl: Architecture highlights, lessons learned |
|
|
57 | (13) |
|
4.1 The original Yubl architecture |
|
|
58 | (3) |
|
|
59 | (1) |
|
|
59 | (1) |
|
Long feature delivery cycles |
|
|
59 | (1) |
|
|
60 | (1) |
|
4.2 The new serverless Yubl architecture |
|
|
61 | (3) |
|
Rearchitecting and rewriting |
|
|
62 | (1) |
|
|
62 | (2) |
|
4.3 Migrating to new microservices gracefully |
|
|
64 | (6) |
|
5 Cloud Guru: Architecture highlights, lessons learned |
|
|
70 | (14) |
|
5.1 The original architecture |
|
|
71 | (11) |
|
The journey to 43 microservices |
|
|
75 | (2) |
|
|
77 | (2) |
|
|
79 | (1) |
|
|
80 | (2) |
|
Security in the BFF world |
|
|
82 | (1) |
|
5.2 Remnants of the legacy |
|
|
82 | (2) |
|
6 Yle: Architecture highlights, lessons learned |
|
|
84 | (13) |
|
6.1 Ingesting events at scale with Fargate |
|
|
85 | (1) |
|
|
85 | (1) |
|
Performance considerations |
|
|
85 | (1) |
|
6.2 Processing events in real-time |
|
|
86 | (5) |
|
|
86 | (1) |
|
SQS dead-letter queue (DLQ) |
|
|
87 | (1) |
|
The Router Lambda function |
|
|
88 | (1) |
|
|
88 | (1) |
|
|
89 | (1) |
|
|
90 | (1) |
|
|
91 | (6) |
|
|
91 | (2) |
|
Build with failure in mind |
|
|
93 | (1) |
|
Batching is good for cost and efficiency |
|
|
94 | (1) |
|
Cost estimation is tricky |
|
|
95 | (2) |
|
|
97 | (68) |
|
7 Building a scheduling service for ad hoc tasks |
|
|
99 | (33) |
|
7.1 Defining nonfunctional requirements |
|
|
101 | (1) |
|
7.2 Cron job with EventBridge |
|
|
102 | (7) |
|
|
104 | (1) |
|
|
105 | (2) |
|
|
107 | (2) |
|
|
109 | (1) |
|
|
109 | (4) |
|
|
110 | (1) |
|
|
111 | (2) |
|
|
113 | (1) |
|
|
113 | (6) |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
116 | (3) |
|
|
119 | (1) |
|
|
119 | (3) |
|
|
120 | (1) |
|
|
120 | (2) |
|
|
122 | (1) |
|
7.6 Combining DynamoDB TTL with SQS |
|
|
122 | (3) |
|
|
123 | (1) |
|
|
124 | (1) |
|
|
125 | (1) |
|
7.7 Choosing the right solution for your application |
|
|
125 | (1) |
|
|
125 | (7) |
|
|
126 | (1) |
|
|
126 | (2) |
|
Scoring the solutions for each application |
|
|
128 | (4) |
|
8 Architecting serverless parallel computing |
|
|
132 | (14) |
|
8.1 Introduction to MapReduce |
|
|
133 | (4) |
|
|
134 | (1) |
|
|
135 | (2) |
|
8.2 Architecture deep dive |
|
|
137 | (7) |
|
|
138 | (3) |
|
|
141 | (3) |
|
8.3 An alternative architecture |
|
|
144 | (2) |
|
9 Code Developer University |
|
|
146 | (19) |
|
|
147 | (3) |
|
|
147 | (1) |
|
|
148 | (2) |
|
9.2 The Code Scoring Service |
|
|
150 | (3) |
|
|
152 | (1) |
|
Code Scoring Service summary |
|
|
153 | (1) |
|
9.3 Student Profile Service |
|
|
153 | (4) |
|
Update Student Scores function |
|
|
155 | (2) |
|
|
157 | (8) |
|
|
158 | (2) |
|
AWS Glue and Amazon Athena |
|
|
160 | (3) |
|
|
163 | (2) |
|
|
165 | (30) |
|
|
167 | (16) |
|
|
167 | (2) |
|
10.2 Before we get started |
|
|
169 | (7) |
|
How a Lambda function handles requests |
|
|
169 | (4) |
|
|
173 | (1) |
|
Load generation on your function and application |
|
|
173 | (1) |
|
Tracking performance and availability |
|
|
174 | (2) |
|
|
176 | (4) |
|
Minimize deployment artifact size |
|
|
176 | (2) |
|
Allocate sufficient resources to your execution environment |
|
|
178 | (1) |
|
|
179 | (1) |
|
|
180 | (3) |
|
Correlation between requests, latency, and concurrency |
|
|
181 | (1) |
|
|
181 | (2) |
|
|
183 | (12) |
|
11.1 Using multiple AWS accounts |
|
|
184 | (2) |
|
Isolate security breaches |
|
|
184 | (1) |
|
Eliminate contention for shared service limits |
|
|
185 | (1) |
|
|
185 | (1) |
|
Better autonomy for your teams |
|
|
185 | (1) |
|
Infrastructure-as-code for AWS Organizations |
|
|
186 | (1) |
|
11.2 Using temporary stacks |
|
|
186 | (2) |
|
Common AWS account structure |
|
|
186 | (1) |
|
Use temporary stacks for feature branches |
|
|
187 | (1) |
|
Use temporary stacks for e2e tests |
|
|
188 | (1) |
|
11.3 Avoid sensitive data in plain text in environment variables |
|
|
188 | (2) |
|
Attackers can still get in |
|
|
189 | (1) |
|
Handle sensitive data securely |
|
|
189 | (1) |
|
11.4 Use EventBridge in event-driven architectures |
|
|
190 | (5) |
|
|
190 | (1) |
|
|
191 | (1) |
|
Archive and replay events |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (3) |
Appendix A Services for your serverless architecture |
|
195 | (5) |
Appendix B Setting up your cloud |
|
200 | (12) |
Appendix C Deployment frameworks |
|
212 | (13) |
Index |
|
225 | |