About the Author |
|
xxiii | |
Acknowledgments |
|
xxv | |
Prologue |
|
xxvii | |
|
Chapter 1 Serverless Basics |
|
|
1 | (36) |
|
What Is Serverless Architecture? |
|
|
1 | (4) |
|
|
2 | (1) |
|
Server vs. Fully Managed vs. Serverless |
|
|
3 | (2) |
|
|
5 | (1) |
|
|
5 | (7) |
|
|
8 | (3) |
|
|
11 | (1) |
|
|
11 | (1) |
|
Separation of Front End (User Interface) and Back End (Processing) |
|
|
12 | (1) |
|
|
12 | (2) |
|
|
14 | (4) |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (2) |
|
|
18 | (1) |
|
|
18 | (2) |
|
|
20 | (3) |
|
|
20 | (1) |
|
|
20 | (1) |
|
|
21 | (1) |
|
Service-Level Agreements (SLAs) |
|
|
21 | (1) |
|
|
21 | (1) |
|
(Almost) Unlimited Scaling |
|
|
22 | (1) |
|
Calculating Cloud Operational Costs |
|
|
22 | (1) |
|
|
23 | (1) |
|
|
23 | (1) |
|
|
23 | (3) |
|
|
23 | (1) |
|
Reduced Scope of Responsibility and Effort |
|
|
24 | (1) |
|
Accurate Operational Cost Estimation and Tracking |
|
|
24 | (1) |
|
Highly Reusable Microservices |
|
|
24 | (1) |
|
|
25 | (1) |
|
Agility and DevOps Are Easier to Implement |
|
|
25 | (1) |
|
Easier to Manage Time, Budgets, and Teams |
|
|
25 | (1) |
|
Highly Scalable, Fast Scaling |
|
|
26 | (1) |
|
Significantly Lower Maintenance Cost |
|
|
26 | (1) |
|
|
26 | (3) |
|
|
26 | (1) |
|
|
27 | (1) |
|
|
27 | (1) |
|
|
27 | (2) |
|
|
29 | (8) |
|
|
29 | (3) |
|
|
32 | (2) |
|
|
34 | (3) |
|
|
37 | (72) |
|
|
37 | (1) |
|
Traditional Organization Structure vs. Serverless |
|
|
38 | (3) |
|
Cloud Center of Excellence (CCoE) |
|
|
41 | (8) |
|
Platform Architecture and Operations Roles |
|
|
44 | (3) |
|
From a Traditional Org Structure to a CCoE |
|
|
47 | (2) |
|
Cloud Controls as Compliance Guardrails |
|
|
49 | (9) |
|
|
52 | (1) |
|
|
53 | (2) |
|
|
55 | (2) |
|
|
57 | (1) |
|
Which Controls to Prioritize? |
|
|
57 | (1) |
|
|
58 | (2) |
|
|
58 | (1) |
|
|
59 | (1) |
|
|
60 | (1) |
|
Serverless Adoption: Current State |
|
|
60 | (2) |
|
Serverless Adoption: Desired State |
|
|
62 | (7) |
|
Serverless Adoption Framework: Business Perspective |
|
|
66 | (1) |
|
Serverless Adoption Framework: People Perspective |
|
|
67 | (1) |
|
Serverless Adoption Framework: Governance Perspective |
|
|
67 | (1) |
|
Serverless Adoption Framework: Platform Perspective |
|
|
68 | (1) |
|
Serverless Adoption Framework: Security Perspective |
|
|
68 | (1) |
|
Serverless Adoption Framework: Operations Perspective |
|
|
69 | (1) |
|
Serverless Adoption: Gap Analysis |
|
|
69 | (3) |
|
Application Suitability for Serverless |
|
|
72 | (8) |
|
Serverless Application Risk Assessment |
|
|
72 | (1) |
|
|
73 | (1) |
|
|
73 | (7) |
|
|
80 | (23) |
|
|
80 | (2) |
|
|
82 | (3) |
|
|
85 | (17) |
|
|
102 | (1) |
|
|
103 | (1) |
|
|
103 | (6) |
|
|
103 | (1) |
|
|
104 | (1) |
|
|
105 | (4) |
|
|
109 | (50) |
|
Total Cost of Ownership (TCO) |
|
|
109 | (3) |
|
The Value of Paying for Utilization |
|
|
112 | (4) |
|
|
114 | (1) |
|
|
115 | (1) |
|
The Cost to Develop Serverless |
|
|
116 | (4) |
|
|
116 | (1) |
|
|
116 | (2) |
|
|
118 | (1) |
|
|
119 | (1) |
|
The Cost of Migrating Applications |
|
|
120 | (2) |
|
The Cost of Maintenance and Operations |
|
|
122 | (1) |
|
Estimating the Cloud Operational Costs |
|
|
123 | (2) |
|
Collecting the Input Data for an Estimate |
|
|
125 | (24) |
|
|
126 | (1) |
|
|
126 | (2) |
|
|
128 | (1) |
|
|
129 | (5) |
|
|
134 | (1) |
|
|
134 | (4) |
|
|
138 | (1) |
|
|
139 | (4) |
|
|
143 | (1) |
|
|
144 | (1) |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
147 | (2) |
|
|
149 | (5) |
|
AWS Cost Management Services |
|
|
150 | (2) |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
154 | (5) |
|
|
154 | (1) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
156 | (1) |
|
|
156 | (1) |
|
Consolidated Billing for AWS Organizations |
|
|
157 | (2) |
|
|
159 | (58) |
|
|
159 | (3) |
|
Examples of Shared Responsibility |
|
|
161 | (1) |
|
|
162 | (1) |
|
Principle of Least Privilege |
|
|
163 | (4) |
|
|
163 | (1) |
|
Static vs. Dynamic Privileges |
|
|
164 | (1) |
|
|
165 | (1) |
|
|
166 | (1) |
|
Identity and Access Management (IAM) |
|
|
167 | (5) |
|
|
169 | (1) |
|
|
170 | (2) |
|
|
172 | (8) |
|
|
172 | (1) |
|
|
173 | (1) |
|
AWS Config (Detective Controls) |
|
|
173 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
174 | (1) |
|
AWS Resource Access Manager or RAM |
|
|
174 | (1) |
|
|
174 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
175 | (1) |
|
|
176 | (1) |
|
|
176 | (1) |
|
|
176 | (1) |
|
API Authentication and Authorization |
|
|
177 | (1) |
|
Security Best Practices for API Gateway |
|
|
178 | (1) |
|
Serverless S3 Antivirus Scanning |
|
|
179 | (1) |
|
|
179 | (1) |
|
Securing Containers by Decoupling |
|
|
179 | (1) |
|
|
180 | (1) |
|
|
180 | (8) |
|
API Gateway Model Schemas |
|
|
184 | (4) |
|
|
188 | (4) |
|
$45,000 Bill for Losing Credentials |
|
|
188 | (1) |
|
|
189 | (1) |
|
Systems Manager Parameter Store |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
192 | (3) |
|
Encryption of Data at Rest |
|
|
192 | (1) |
|
Encryption of Data in Transit |
|
|
193 | (1) |
|
Public/Private Key Encryption |
|
|
193 | (1) |
|
|
194 | (1) |
|
Encryption Exceptions in AWS Cloud |
|
|
194 | (1) |
|
|
195 | (7) |
|
|
197 | (1) |
|
|
198 | (1) |
|
|
199 | (1) |
|
|
200 | (2) |
|
|
202 | (3) |
|
|
203 | (2) |
|
|
205 | (1) |
|
|
205 | (7) |
|
What Is Privacy in a Technology Context, and Why Is It Important? |
|
|
206 | (1) |
|
|
207 | (1) |
|
|
208 | (1) |
|
Why Serverless for GDPR Compliance |
|
|
209 | (1) |
|
Implementing for Compliance |
|
|
210 | (2) |
|
Security Monitoring with ElectricEye |
|
|
212 | (5) |
|
|
212 | (1) |
|
|
213 | (4) |
|
|
217 | (56) |
|
|
217 | (1) |
|
|
218 | (9) |
|
|
218 | (3) |
|
|
221 | (2) |
|
|
223 | (4) |
|
Serverless Roles: Solution Architect |
|
|
227 | (1) |
|
Serverless Roles: Cloud Security Engineer |
|
|
228 | (1) |
|
Serverless Roles: Deployment Automation Engineer |
|
|
229 | (2) |
|
Serverless Roles: Full-Stack Developer |
|
|
231 | (2) |
|
Serverless Roles: Database Engineer |
|
|
233 | (1) |
|
Serverless Roles: Project Manager |
|
|
234 | (1) |
|
|
235 | (16) |
|
Foundational Certification |
|
|
238 | (1) |
|
|
238 | (2) |
|
Professional Certification |
|
|
240 | (1) |
|
|
241 | (3) |
|
Online Resources to Learn About Serverless |
|
|
244 | (7) |
|
Serverless Team Structure |
|
|
251 | (2) |
|
|
253 | (3) |
|
Key Performance Indicators (KPIs) |
|
|
255 | (1) |
|
Borrowing a Team: Working with Serverless Vendors |
|
|
256 | (7) |
|
Experienced Serverless Vendors |
|
|
258 | (1) |
|
|
259 | (1) |
|
|
260 | (1) |
|
|
261 | (2) |
|
Vetting Serverless Capabilities |
|
|
263 | (10) |
|
Chapter 6 DevOps and Tooling |
|
|
273 | (70) |
|
|
273 | (3) |
|
Principles and Practices of DevOps |
|
|
274 | (1) |
|
Problems Solved by DevOps |
|
|
274 | (2) |
|
|
276 | (1) |
|
|
276 | (5) |
|
|
278 | (2) |
|
|
280 | (1) |
|
|
281 | (8) |
|
Declarative vs. Imperative |
|
|
283 | (2) |
|
|
285 | (2) |
|
CloudFormation Challenges |
|
|
287 | (2) |
|
AWS CloudFormation Planning |
|
|
289 | (9) |
|
|
290 | (4) |
|
|
294 | (1) |
|
|
295 | (3) |
|
|
298 | (4) |
|
|
301 | (1) |
|
AWS Serverless Application Model (SAM) |
|
|
302 | (2) |
|
Serverless Application Repository |
|
|
304 | (1) |
|
|
304 | (1) |
|
|
304 | (3) |
|
AWS Cloud Development Kit (CDK) |
|
|
307 | (4) |
|
Differences Between Amplify and CDK |
|
|
311 | (1) |
|
CDK Technical Considerations |
|
|
311 | (9) |
|
|
312 | (1) |
|
Existing Cloud Formation Projects |
|
|
313 | (1) |
|
|
313 | (1) |
|
|
314 | (5) |
|
|
319 | (1) |
|
|
320 | (3) |
|
|
322 | (1) |
|
|
323 | (5) |
|
|
323 | (1) |
|
|
324 | (4) |
|
|
328 | (6) |
|
|
333 | (1) |
|
|
333 | (1) |
|
|
334 | (6) |
|
AWS Command-Line Interface (CLI) |
|
|
334 | (1) |
|
|
334 | (1) |
|
Integrated Development Environment (IDE) |
|
|
335 | (4) |
|
|
339 | (1) |
|
|
340 | (3) |
|
AWS Well-Architected Framework |
|
|
340 | (1) |
|
|
341 | (1) |
|
|
341 | (1) |
|
Amazon CodeWhisperer Preview |
|
|
342 | (1) |
|
|
343 | (58) |
|
|
343 | (2) |
|
|
345 | (4) |
|
|
349 | (3) |
|
|
352 | (4) |
|
Relational Database Service (RDS) |
|
|
356 | (6) |
|
|
357 | (1) |
|
|
358 | (1) |
|
|
358 | (3) |
|
Aurora Serverless Data API |
|
|
361 | (1) |
|
|
362 | (1) |
|
|
362 | (16) |
|
|
363 | (2) |
|
|
365 | (1) |
|
Comparison of DynamoDB Billing Models |
|
|
366 | (1) |
|
|
367 | (1) |
|
|
368 | (1) |
|
|
369 | (1) |
|
|
370 | (5) |
|
|
375 | (2) |
|
|
377 | (1) |
|
|
378 | (2) |
|
Serverless NoSQL Databases |
|
|
380 | (2) |
|
|
380 | (1) |
|
|
380 | (1) |
|
Amazon Quantum Ledger Database |
|
|
381 | (1) |
|
|
382 | (1) |
|
|
382 | (1) |
|
|
383 | (1) |
|
NoSQL Databases Comparison |
|
|
383 | (2) |
|
|
385 | (2) |
|
|
385 | (1) |
|
|
386 | (1) |
|
|
387 | (5) |
|
|
387 | (5) |
|
Simple Storage Solution (S3) |
|
|
392 | (7) |
|
|
392 | (1) |
|
|
393 | (1) |
|
|
394 | (1) |
|
|
394 | (3) |
|
Avoiding Size Limit Issues in Lambda |
|
|
397 | (2) |
|
Elastic File System (EFS) |
|
|
399 | (2) |
|
Chapter 8 Logging and Testing |
|
|
401 | (86) |
|
|
401 | (1) |
|
|
402 | (1) |
|
|
403 | (2) |
|
|
404 | (1) |
|
Logging Format and Content |
|
|
405 | (2) |
|
Service Logs in the Cloud |
|
|
407 | (1) |
|
|
408 | (1) |
|
|
409 | (3) |
|
|
409 | (1) |
|
|
410 | (1) |
|
|
410 | (1) |
|
|
411 | (1) |
|
|
412 | (1) |
|
|
413 | (3) |
|
Managed Services for Proactive Logging |
|
|
416 | (1) |
|
|
417 | (4) |
|
|
420 | (1) |
|
|
421 | (14) |
|
|
422 | (2) |
|
|
424 | (2) |
|
|
426 | (1) |
|
|
427 | (1) |
|
|
428 | (2) |
|
|
430 | (3) |
|
Tracking the Cost of Other Services |
|
|
433 | (2) |
|
|
435 | (6) |
|
|
435 | (2) |
|
|
437 | (2) |
|
|
439 | (2) |
|
|
441 | (5) |
|
|
441 | (1) |
|
|
441 | (2) |
|
|
443 | (3) |
|
|
446 | (1) |
|
Testing Challenges in Serverless |
|
|
446 | (7) |
|
|
447 | (1) |
|
Creating and Maintaining Tests |
|
|
448 | (1) |
|
|
449 | (1) |
|
Integrated Managed Services |
|
|
450 | (1) |
|
|
450 | (2) |
|
|
452 | (1) |
|
|
453 | (6) |
|
|
454 | (1) |
|
|
455 | (2) |
|
|
457 | (2) |
|
|
459 | (1) |
|
|
459 | (6) |
|
|
461 | (2) |
|
Comparing the Types of Testing |
|
|
463 | (1) |
|
Contract Testing with Pact for Serverless |
|
|
463 | (2) |
|
|
465 | (5) |
|
Risk Assessment for Testing |
|
|
470 | (1) |
|
Test Pyramid vs. Test Honeycomb |
|
|
471 | (2) |
|
|
473 | (2) |
|
|
475 | (12) |
|
Serverless Application Model (SAM) |
|
|
475 | (1) |
|
|
476 | (2) |
|
|
478 | (1) |
|
|
478 | (2) |
|
CloudWatch Real User Monitoring (RUM) |
|
|
480 | (2) |
|
|
482 | (2) |
|
Fault Injection Simulator (FIS) |
|
|
484 | (2) |
|
|
486 | (1) |
|
|
487 | (140) |
|
Challenges and Mitigations |
|
|
487 | (18) |
|
|
487 | (4) |
|
Service-Level Agreements (SLAs) |
|
|
491 | (1) |
|
|
491 | (1) |
|
|
492 | (4) |
|
|
496 | (2) |
|
Maturity of the Technology |
|
|
498 | (1) |
|
|
499 | (4) |
|
|
503 | (1) |
|
|
504 | (1) |
|
|
505 | (1) |
|
AWS: Microservices and APIs |
|
|
505 | (19) |
|
Lambda Scalability and Cold Start |
|
|
505 | (1) |
|
|
506 | (2) |
|
|
508 | (1) |
|
|
508 | (3) |
|
|
511 | (1) |
|
Lambda Environment Variables |
|
|
512 | (1) |
|
|
512 | (1) |
|
What Metrics to Monitor for CloudWatch and Why? |
|
|
513 | (1) |
|
|
514 | (1) |
|
|
515 | (3) |
|
Proxy vs. Non-proxy Integration |
|
|
518 | (1) |
|
|
519 | (1) |
|
|
520 | (1) |
|
|
520 | (1) |
|
|
520 | (1) |
|
Lambda and Application Load Balancer |
|
|
521 | (3) |
|
|
524 | (2) |
|
When Not to Use Strict Microservice Architecture |
|
|
525 | (1) |
|
Microservice Example Architectures |
|
|
526 | (8) |
|
|
526 | (1) |
|
|
527 | (2) |
|
|
529 | (1) |
|
|
530 | (2) |
|
|
532 | (2) |
|
|
534 | (5) |
|
|
539 | (5) |
|
Decoupling Started with Servers |
|
|
539 | (1) |
|
|
540 | (1) |
|
|
541 | (1) |
|
|
541 | (3) |
|
|
544 | (21) |
|
Simple Queue Service (SQS) |
|
|
544 | (1) |
|
SQS Message Delay and Visibility Timeout |
|
|
545 | (4) |
|
SQS and Lambda Integration |
|
|
549 | (3) |
|
|
552 | (2) |
|
|
554 | (2) |
|
Simple Notification Service (SNS) |
|
|
556 | (3) |
|
|
559 | (3) |
|
|
562 | (2) |
|
|
564 | (1) |
|
Event-Driven Architecture |
|
|
565 | (7) |
|
Asynchronous Design Pattern |
|
|
572 | (5) |
|
|
573 | (4) |
|
|
577 | (2) |
|
|
578 | (1) |
|
|
578 | (1) |
|
|
579 | (1) |
|
|
579 | (7) |
|
|
580 | (2) |
|
|
582 | (1) |
|
|
582 | (3) |
|
|
585 | (1) |
|
|
585 | (1) |
|
AWS: Internet of Things (IoT) |
|
|
586 | (15) |
|
|
592 | (2) |
|
Industrial Internet of Things (MoT) |
|
|
594 | (1) |
|
|
594 | (2) |
|
|
596 | (3) |
|
|
599 | (2) |
|
AWS: Managed Machine Learning (ML) |
|
|
601 | (9) |
|
|
601 | (2) |
|
|
603 | (1) |
|
|
603 | (1) |
|
|
604 | (1) |
|
|
605 | (2) |
|
|
607 | (2) |
|
|
609 | (1) |
|
|
609 | (1) |
|
|
610 | (2) |
|
|
611 | (1) |
|
Quantum Ledger Database (QLDB) |
|
|
612 | (1) |
|
|
612 | (3) |
|
Well-Architected Framework |
|
|
615 | (6) |
|
The Five Pillars of the Well-Architected Framework |
|
|
616 | (1) |
|
|
617 | (1) |
|
Why Use the AWS Well-Architected Framework? |
|
|
618 | (1) |
|
AWS Well-Architected Tool |
|
|
619 | (1) |
|
Serverless Lens and Its Layers |
|
|
619 | (2) |
|
|
621 | (6) |
|
|
621 | (1) |
|
|
621 | (1) |
|
|
622 | (1) |
|
|
623 | (1) |
|
Pick the Right Tool for the Job |
|
|
623 | (1) |
|
Cognito as a User Database |
|
|
624 | (3) |
|
|
627 | (58) |
|
|
627 | (2) |
|
|
629 | (10) |
|
|
632 | (1) |
|
|
633 | (3) |
|
|
636 | (3) |
|
|
639 | (6) |
|
|
645 | (6) |
|
|
646 | (1) |
|
Making the Media Services More Serverless |
|
|
647 | (2) |
|
Video Processing and Analysis |
|
|
649 | (2) |
|
|
651 | (6) |
|
|
655 | (2) |
|
|
657 | (1) |
|
SEO-Friendly Website and CMS |
|
|
657 | (2) |
|
|
658 | (1) |
|
|
659 | (3) |
|
|
661 | (1) |
|
|
662 | (3) |
|
True Serverless Containersl |
|
|
665 | (20) |
|
1 Create, Configure, and Build Our Docker Container |
|
|
667 | (1) |
|
2 Put the Container in a Registry |
|
|
667 | (1) |
|
3 Enable Long ARN Names in ECS |
|
|
668 | (1) |
|
4 Create Any Support Services |
|
|
668 | (1) |
|
5 Create the Policies and Roles |
|
|
669 | (2) |
|
6 Create a Task Definition |
|
|
671 | (1) |
|
7 Add the Container to the Task Definition |
|
|
671 | (1) |
|
8 Create the Cluster (and VPC) That the Task Will Run In |
|
|
672 | (4) |
|
|
676 | (1) |
|
|
677 | (2) |
|
Launching a VPC and Cluster (If We Went with Option 3) |
|
|
679 | (3) |
|
Launching a Fargate Service |
|
|
682 | (1) |
|
Retrieve the Container IP |
|
|
682 | (1) |
|
|
683 | (2) |
Epilogue |
|
685 | (2) |
References |
|
687 | (8) |
Index |
|
695 | |