![AWS Lambda in Action: Event-driven serverless applications](http://img.images-bn.com/static/redesign/srcs/images/grey-box.png?v11.9.4)
![AWS Lambda in Action: Event-driven serverless applications](http://img.images-bn.com/static/redesign/srcs/images/grey-box.png?v11.9.4)
eBook
Available on Compatible NOOK devices, the free NOOK App and in My Digital Library.
Related collections and offers
Overview
AWS Lambda in Action is an example-driven tutorial that teaches you how to build applications that use an event-driven approach on the back end.
Foreword by James Governor.
About the Technology
With AWS Lambda, you write your code and upload it to the AWS cloud. AWS Lambda responds to the events triggered by your application or your users, and automatically manages the underlying computer resources for you. Back-end tasks like analyzing a new document or processing requests from a mobile app are easy to implement. Your application is divided into small functions, leading naturally to a reactive architecture and the adoption of microservices.
About the Book
AWS Lambda in Action is an example-driven tutorial that teaches you how to build applications that use an event-driven approach on the back-end. Starting with an overview of AWS Lambda, the book moves on to show you common examples and patterns that you can use to call Lambda functions from a web page or a mobile app. The second part of the book puts these smaller examples together to build larger applications. By the end, you'll be ready to create applications that take advantage of the high availability, security, performance, and scalability of AWS.
What's Inside
- Create a simple API
- Create an event-driven media-sharing application
- Secure access to your application in the cloud
- Use functions from different clients like web pages or mobile apps
- Connect your application with external services
About the Reader
Requires basic knowledge of JavaScript. Some examples are also provided in Python. No AWS experience is assumed.
About the Author
Danilo Poccia is a technical evangelist at Amazon Web Services and a frequent speaker at public events and workshops.
Table of Contents
- Running functions in the cloud
- Your first Lambda function
- Your function as a web API
- Managing security
- Using standalone functions
- Managing identities
- Calling functions from a client
- Designing an authentication service
- Implementing an authentication service
- Adding more features to the authentication service
- Building a media-sharing application
- Why event-driven?
- Improving development and testing
- Automating deployment
- Automating infrastructure management
- Calling external services
- Receiving events from other services
PART 1 - FIRST STEPS PART 2 - BUILDING EVENT-DRIVEN APPLICATIONS PART 3 - FROM DEVELOPMENT TO PRODUCTION PART 4 - USING EXTERNAL SERVICES
Product Details
ISBN-13: | 9781638352051 |
---|---|
Publisher: | Manning |
Publication date: | 11/27/2016 |
Sold by: | SIMON & SCHUSTER |
Format: | eBook |
Pages: | 384 |
File size: | 12 MB |
Note: | This product may take a few minutes to download. |
About the Author
Danilo Poccia is a technical evangelist at Amazon Web Services and a frequent speaker at public events and workshops.
Table of Contents
Foreword xv
Dedication xvii
Preface xviii
Acknowledgments xx
About this book xxi
About the cover illustration xxiii
Part 1 First Steps 1
1 Running functions in the cloud 3
1.1 Introducing AWS Lambda 6
1.2 Functions as your back end 11
1.3 A single back end for everything 12
1.4 Event-driven applications 15
1.5 Calling functions from a client 19
Summary 22
2 Your first Lambda function 23
2.1 Creating a new function 24
2.2 Writing the function 27
2.3 Specifying other settings 28
2.4 Testing the function 31
2.5 Executing the function through the Lambda API 33
Summary 35
Exercise 35
Solution 36
3 Your Junction as a web API 38
3.1 Introducing the Amazon API Gateway 39
3.2 Creating the API 41
3.3 Creating the integration 42
3.4 Testing the integration 45
3.5 Transforming the response 46
3.6 Using resource paths as parameters 52
3.7 Using the API Gateway context 55
Summary 58
Exercise 58
Solution 59
Part 2 Building Event-Driven Applications 61
4 Managing security 63
4.1 Users, groups, and roles 64
4.2 Understanding policies 69
4.3 Policies in practice 71
4.4 Using policy variables 77
4.5 Assuming roles 79
Summary 82
Exercise 82
Solution 82
5 Using standalone functions 83
5.1 Packaging libraries and modules with your function 84
5.2 Subscribing functions to events 85
Creating the back-end resources 86
Packaging the function 88
Configuring permissions 91
Creating the function 94
Testing the Junction 96
5.3 Using binaries with your function 98
Preparing the environment 99
Implementing the function 100
Testing the function 104
5.4 Scheduling function execution 105
Summary 109
Exercise 109
Solution 110
6 Managing identities 111
6.1 Introducing Amazon Cognito Identity 112
6.2 External identity providers 115
6.3 Integrating custom authentications 116
6.4 Having authenticated and unauthenticated users 118
6.5 Using policy variables with Amazon Cognito 118
Summary 123
Exercise 123
Solution 123
7 Calling functions from a client 126
7.1 Calling functions from JavaScript 126
Creating the identity pool 127
Giving permissions to the Lambda function 131
Creating the web page 135
7.2 Calling functions from a mobile app 138
Sample code for native mobile apps 142
7.3 Calling functions from a web browser 144
Integrating the Lambda functions with the Amazon API Gateway 146
Summary 148
Exercise 148
Solution 149
8 Designing an authentication service 151
8.1 The interaction model 152
8.2 The event-driven architecture 154
8.3 Working with Amazon Cognito 159
8.4 Storing user profiles 160
8.5 Adding more data to user profiles 160
8.6 Encrypting passwords 161
Summary 162
Exercise 162
Solution 163
9 Implementing an authentication service 164
9.1 Managing a centralized configuration 166
9.2 Automating initialization and deployment 167
9.3 Having shared code 168
9.4 Creating the home page 169
9.5 Signing up new users 171
9.6 Validating user emails 178
Summary 182
Exercise 183
Solution 183
10 Adding more features to the authentication service 187
10.1 Reporting lost passwords 188
10.2 Resetting passwords 194
10.3 Logging in users 200
10.4 Getting AWS credentials for authenticated users 205
10.5 Changing passwords 206
Summary 213
Exercise 214
Solution 214
11 Building a media-sharing application 216
11.1 The event-driven architecture 217
Simplifying the implementation 218
Consolidating functions 221
Evolving an event-driven architecture 223
11.2 Defining an object namespace for Amazon S3 225
11.3 Designing the data model for Amazon DynamoDB 226
11.4 The client application 228
11.5 Reacting to content updates 239
11.6 Updating content indexes 243
Summary 248
Exercise 248
Solution 248
12 Why event-driven? 250
12.1 Overview of event-driven architectures 251
12.2 Starting from the front end 252
12.3 What about the back end? 254
12.4 Reactive programming 259
12.5 The path to microservices 262
12.6 Scalability of the platform 264
12.7 Availability and resilience 266
12.8 Estimating costs 267
Summary 270
Exercise 270
Solution 271
Part 3 From Development to Production 273
13 Improving development and testing 275
13.1 Developing locally 276
Developing locally in Node.js 277
Developing locally in Python 278
Community tools 279
13.2 Logging and debugging 279
13.3 Using function versioning 281
13.4 Using aliases to manage different environments 282
13.5 Development tools and frameworks 283
Chalice Python microframework 284
Apex serverless architecture 287
Serverless Framework 288
13.6 Simple serverless testing 290
Summary 293
Exercise 293
Solution 294
14 Automating deployment 296
14.1 Storing code on Amazon S3 296
14.2 Event-driven serverless continuous deployment 299
14.3 Deploying with AWS CloudFormation 302
14.4 Multiregion deployments 309
Summary 311
Exercise 311
Solution 312
15 Automating infrastructure management 314
15.1 Reacting to alarms 315
15.2 Reacting to events 317
15.3 Processing logs in near real-time 318
15.4 Scheduling recurring activities 319
15.5 Multiregion architectures and data synchronization 320
Summary 322
Exercise 323
Solution 323
Part 4 Using External Services 325
16 Calling external services 327
16.1 Managing secrets and credentials 327
16.2 Using IFTTT Maker Channel 331
16.3 Sending messages to a Slack team 333
16.4 Automating the management of your GitHub repository 335
Summary 337
Exercise 337
Solution 337
17 Receiving events from other services 339
17.1 Who's calling? 340
17.2 The webhook pattern 341
17.3 Handling events from Slack 342
17.4 Handling events from GitHub 344
17.5 Handling events from Twilio 344
17.6 Using MongoDB as a trigger 345
17.7 The log monitoring pattern 346
Summary 347
Exercise 347
Solution 348
Index 349