Serverless Architectures on AWS

This document was uploaded by one of our users. The uploader already confirmed that they had the permission to publish it. If you are author/publisher or own the copyright of this documents, please report to us by using this DMCA report form.

Simply click on the Download Book button.

Yes, Book downloads on Ebookily are 100% Free.

Sometimes the book is free on Amazon As well, so go ahead and hit "Search on Amazon"

Design low-maintenance systems using pre-built cloud services! Bring down costs, automate time-consuming ops tasks, and scale on demand. In Serverless Architectures on AWS, Second Edition you will learn: • First steps with serverless computing • The principles of serverless design • Important patterns and architectures • How successfully companies have implemented serverless • Real-world architectures and their tradeoffs Serverless Architectures on AWS, Second Edition teaches you how to design serverless systems. You’ll discover the principles behind serverless architectures, and explore real-world case studies where companies used serverless architectures for their products. You won’t just master the technical essentials—the book contains extensive coverage of balancing tradeoffs and making essential technical decisions. This new edition has been fully updated with new chapters covering current best practice, example architectures, and full coverage of the latest changes to AWS. About the technology Maintaining server hardware and software can cost a lot of time and money. Unlike traditional data center infrastructure, serverless architectures offload core tasks like data storage and hardware management to pre-built cloud services. Better yet, you can combine your own custom AWS Lambda functions with other serverless services to create features that automatically start and scale on demand, reduce hosting cost, and simplify maintenance. About the book In Serverless Architectures with AWS, Second Edition you’ll learn how to design serverless systems using Lambda and other services on the AWS platform. You’ll explore event-driven computing and discover how others have used serverless designs successfully. This new edition offers real-world use cases and practical insights from several large-scale serverless systems. Chapters on innovative serverless design patterns and architectures will help you become a complete cloud professional. What's inside • First steps with serverless computing • The principles of serverless design • Important patterns and architectures • Real-world architectures and their tradeoffs About the reader For server-side and full-stack software developers. About the author Peter Sbarski is VP of Education and Research at A Cloud Guru. Yan Cui is an independent AWS consultant and educator. Ajay Nair is one of the founding members of the AWS Lambda team.

Author(s): Peter Sbarski, Yan Cui, Ajay Nair
Edition: 2
Publisher: Manning Publications
Year: 2020

Language: English
Commentary: Vector PDF
Pages: 256
City: Shelter Island, NY
Tags: Amazon Web Services; Best Practices; Software Architecture; AWS Lambda; Serverless Architecture

Serverless Architectures on AWS, Second Edition
brief contents
contents
preface
acknowledgments
about this book
About the code
liveBook discussion forum
about the authors
about the cover illustration
Part 1: First steps
Chapter 1: Going serverless
1.1 What’s in a name?
1.2 Understanding serverless architectures
1.2.1 Service-oriented architecture and microservices
1.2.2 Implementing architecture the conventional way
1.2.3 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?
Chapter 2: First steps to ser verless
2.1 Building a video-encoding pipeline
2.1.1 A quick note on AWS costs
2.1.2 Using Amazon Web Services (AWS)
2.2 Preparing your system
2.2.1 Setting up your system
2.2.2 Working with Identity and Access Management (IAM)
2.2.3 Let’s make a bucket
2.2.4 Creating an IAM role
2.2.5 Using AWS Elemental MediaConvert
2.2.6 Using MediaConvert Role
2.3 Starting with the Serverless Framework
2.3.1 Setting up the Serverless Framework
2.3.2 Bringing Serverless Framework to The 24-Hour Video
2.3.3 Creating your first Lambda function
2.4 Testing in AWS
2.5 Looking at logs
Chapter 3: Architectures and patterns
3.1 Use cases
3.1.1 Backend compute
3.1.2 Internet of Things (IoT)
3.1.3 Data processing and manipulation
3.1.4 Real-time analytics
3.1.5 Legacy API proxy
3.1.6 Scheduled services
3.1.7 Bots and skills
3.1.8 Hybrids
3.2 Patterns
3.2.1 GraphQL
3.2.2 Command pattern
3.2.3 Messaging pattern
3.2.4 Priority queue pattern
3.2.5 Fan-out pattern
3.2.6 Compute as glue
3.2.7 Pipes and filters pattern
Part 2: Use cases
Chapter 4: Yubl: Architecture highlights, lessons learned
4.1 The original Yubl architecture
4.1.1 Scalability problems
4.1.2 Performance problems
4.1.3 Long feature delivery cycles
4.1.4 Why serverless?
4.2 The new serverless Yubl architecture
4.2.1 Rearchitecting and rewriting
4.2.2 The new search API
4.3 Migrating to new microservices gracefully
Chapter 5: A Cloud Guru: Architecture highlights, lessons learned
5.1 The original architecture
5.1.1 The journey to 43 microservices
5.1.2 What is GraphQL
5.1.3 Moving to GraphQL
5.1.4 Service discovery
5.1.5 Security in the BFF world
5.2 Remnants of the legacy
Chapter 6: Yle: Architecture highlights, lessons learned
6.1 Ingesting events at scale with Fargate
6.1.1 Cost considerations
6.1.2 Performance considerations
6.2 Processing events in real-time
6.2.1 Kinesis Data Streams
6.2.2 SQS dead-letter queue (DLQ)
6.2.3 The Router Lambda function
6.2.4 Kinesis Data Firehose
6.2.5 Kinesis Data Analytics
6.2.6 Putting it altogether
6.3 Lessons learned
6.3.1 Know your service limits
6.3.2 Build with failure in mind
6.3.3 Batching is good for cost and efficiency
6.3.4 Cost estimation is tricky
Part 3: Practicum
Chapter 7: Building a scheduling ser vice for ad hoc tasks
7.1 Defining nonfunctional requirements
7.2 Cron job with EventBridge
7.2.1 Your scores
7.2.2 Our scores
7.2.3 Tweaking the solution
7.2.4 Final thoughts
7.3 DynamoDB TTL
7.3.1 Your scores
7.3.2 Our scores
7.3.3 Final thoughts
7.4 Step Functions
7.4.1 Your scores
7.4.2 Our scores
7.4.3 Tweaking the solution
7.4.4 Final thoughts
7.5 SQS
7.5.1 Your scores
7.5.2 Our scores
7.5.3 Final thoughts
7.6 Combining DynamoDB TTL with SQS
7.6.1 Your scores
7.6.2 Our scores
7.6.3 Final thoughts
7.7 Choosing the right solution for your application
7.8 The applications
7.8.1 Your weights
7.8.2 Our weights
7.8.3 Scoring the solutions for each application
Chapter 8: Architecting ser verless parallel computing
8.1 Introduction to MapReduce
8.1.1 How to transcode a video
8.1.2 Architecture overview
8.2 Architecture deep dive
8.2.1 Maintaining state
8.2.2 Step Functions
8.3 An alternative architecture
Chapter 9: Code Developer University
9.1 Solution overview
9.1.1 Requirements listed
9.1.2 Solution architecture
9.2 The Code Scoring Service
9.2.1 Submissions Queue
9.2.2 Code Scoring Service summary
9.3 Student Profile Service
9.3.1 Update Student Scores function
9.4 Analytics Service
9.4.1 Kinesis Firehose
9.4.2 AWS Glue and Amazon Athena
9.4.3 QuickSight
Part 4: The future
Chapter 10: Blackbelt Lambda
10.1 Where to optimize?
10.2 Before we get started
10.2.1 How a Lambda function handles requests
10.2.2 Latency: Cold vs. warm
10.2.3 Load generation on your function and application
10.2.4 Tracking performance and availability
10.3 Optimizing latency
10.3.1 Minimize deployment artifact size
10.3.2 Allocate sufficient resources to your execution environment
10.3.3 Optimize function logic
10.4 Concurrency
10.4.1 Correlation between requests, latency, and concurrency
10.4.2 Managing concurrency
Chapter 11: Emerging practices
11.1 Using multiple AWS accounts
11.1.1 Isolate security breaches
11.1.2 Eliminate contention for shared service limits
11.1.3 Better cost monitoring
11.1.4 Better autonomy for your teams
11.1.5 Infrastructure-as-code for AWS Organizations
11.2 Using temporary stacks
11.2.1 Common AWS account structure
11.2.2 Use temporary stacks for feature branches
11.2.3 Use temporary stacks for e2e tests
11.3 Avoid sensitive data in plain text in environment variables
11.3.1 Attackers can still get in
11.3.2 Handle sensitive data securely
11.4 Use EventBridge in event-driven architectures
11.4.1 Content-based filtering
11.4.2 Schema discovery
11.4.3 Archive and replay events
11.4.4 More targets
11.4.5 Topology
appendix A: Ser vices for your ser verless architecture
A.1 API Gateway
A.2 Simple Notification Service (SNS)
A.3 Simple Storage Service (S3)
A.4 Simple Queue Service (SQS)
A.5 Simple Email Service (SES)
A.6 Relational Database Service (RDS)
A.7 DynamoDB
A.8 Algolia
A.9 Media Services
A.10 Kinesis Streams
A.11 Athena
A.12 AppSync
A.13 Cognito
A.14 Auth0
A.15 Other services
appendix B: Setting up your cloud
B.1 Security model and identity management
B.1.1 Creating and managing IAM users
B.1.2 Groups
B.1.3 Roles
B.1.4 Resources
B.1.5 Permissions and policies
B.2 Cost
B.2.1 Creating billing alerts
B.2.2 Monitoring and optimizing costs
B.2.3 Using the Simple Monthly Calculator
B.2.4 Calculating Lambda and API Gateway costs
appendix C: Deployment frameworks
C.1 Serverless Framework
C.1.1 Getting started
C.1.2 Language support
C.1.3 Invoking functions locally
C.1.4 Plugins
C.2 Serverless Application Model (SAM)
C.3 Terraform
C.4 Cloud Development Kit
C.4.1 Where CDK shines
C.4.2 CDK challenges
C.5 Amplify
index
Numerics
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y