O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Production-Ready Serverless

Video Description

The level of detail and pace are perfect for someone looking to tackle a complicated subject and being directly hands on like this is great. Best resource for real-world Serverless usage I have seen so far.
survey responder

Production-Ready Serverless: Operational Best Practices teaches you how to build applications that take advantage of AWS Lambda and other AWS platform features like API Gateway and Kinesis. AWS expert Yan Cui guides you from writing your first AWS Lambda functions through handling the operational challenges Lambda can bring as you integrate serverless development practices into your applications. You'll build a basic e-commerce site piece by piece, including a Lambda-based web API using the API Gateway service. This hands-on course introduces processing events in real-time using Lambda and Kinesis Streams, implementing security against common OWASP attacks, modern serverless design patterns, and best practices for maximizing performance and minimizing cost!

AWS Lambda is a platform for running cloud-hosted functions—small, single-responsibility services that handle tasks and orchestrate data flow among other AWS services. Lambda functions responds to the events triggered by users and your application. AWS automatically scales Lambda for you based on demand, so you can minimize infrastructure plumbing management and enjoy the reliability, security, and responsiveness you need to create amazing applications!
Inside:

  • Creating and deploying Lambda functions with the Serverless framework
  • Building web APIs with Lambda and API Gateway
  • Implementing authentication and authorization using API Gateway, IAM, and Cognito User Pools
  • Implementing canary deployments using API Gateway and Lambda
  • Processing real-time events with Lambda and Kinesis Streams
  • Collecting and aggregating analytics events in real-time
  • Testing Lambda functions
  • Managing configurations for Lambda functions at scale
  • Securing applications against common OWASP attacks
  • Leading practices for Lambda, API Gateway and Kinesis Serverless design patterns
For developers with some experience building cloud-based applications on AWS.

Yan Cui has worked with AWS since 2010 and has architected and implemented many scalable backend systems running on AWS, including a successful mobile game with 1,000,000 daily active users. He has worked with AWS Lambda in production extensively in the last 18 months, including migrating a social network from a monolithic backend architecture running on EC2 to an event-driven, service-oriented architecture centered around AWS Lambda. Yan is also an AWS hero!

An essential guide to getting started with Serverless with AWS Lambda.
Michael Bright

The jump start you need to serverless AWS Development.
Paulo Cesar Dias Lima

Excellent introduction to securing and deploying your first serverless lambda on AWS.
Anonymous Reviewer

Table of Contents

  1. INTRODUCTION
    1. Introduction to course 00:07:50
    2. AWS Lambda 101 00:09:25
    3. Serverless Framework 101 00:10:03
    4. Managing permissions for the Serverless Framework 00:04:54
  2. BUILDING API WITH API GATEWAY AND LAMBDA
    1. Creating a landing page 00:09:30
    2. Creating the restaurants API 00:09:32
    3. Displaying restaurants on the landing page 00:03:51
    4. How to secure APIs in API Gateway 00:09:09
    5. Securing the get-restaurants endpoint with IAM authorization 00:04:56
    6. Cognito 101 00:07:02
    7. Securing API endpoints with Cognito user pools 00:08:20
    8. Leading practices for API Gateway 00:10:28
    9. Summary 00:02:59
  3. TESTING
    1. AWS Lambda requires a different approach to testing 00:05:40
    2. Writing integration tests 00:11:06
    3. Writing acceptance tests 00:11:23
    4. BONUS What can possibly go wrong? 00:07:05
  4. DEBUGGING
    1. Running and debugging functions locally with the Serverless Framework 00:06:50
    2. Running and debugging functions locally with SAM local 00:05:41
    3. Serverless Framework vs. SAM Local 00:02:19
  5. CI/CD
    1. What is CI/CD? 00:09:48
    2. Setting up a CI/CD pipeline for deploying Lambda functions 00:10:24
    3. Troubleshooting AWS CodeBuild problems 00:07:50
    4. Summary 00:03:18
  6. PROJECT ORGANIZATION TIPS
    1. Few monolithic functions vs. many single-purpose functions 00:11:14
    2. How should you organize your functions into repos? 00:09:48
    3. How should you manage shared infrastructures? 00:08:07
    4. Tips for more effective teamwork 00:12:22
  7. PROCESS REAL-TIME EVENTS WITH KINESIS & LAMBDA
    1. Designing the order flow with events 00:07:38
    2. Implementing the place-order step 00:05:40
    3. Implementing the notify-restaurant step 00:06:32
    4. Implementing the accept-order step 00:02:07
    5. Implementing the notify-user step 00:03:18
    6. Implementing the fulfill-order step 00:01:34
    7. Dealing with partial failures 00:07:02
    8. Implementing partial failure retries with SNS 00:08:12
    9. Implementing per-function IAM roles 00:04:36
    10. Leading practices for using Kinesis and Lambda 00:04:37
    11. Problems with the event-driven approach 00:05:58
    12. Summary 00:03:32
  8. LOGGING
    1. Pushing logs from CloudWatch Logs to Elasticsearch 00:11:12
    2. Structured logging 00:08:00
    3. Sample debug-level logging 00:09:00
  9. MONITORING
    1. Serverless monitoring requires a different way of thinking 00:07:23
    2. Recording custom metrics synchronously 00:08:25
    3. Recording custom metrics asynchronously 00:08:07
    4. Recording memory usage and billed duration as metrics 00:04:05
    5. Auto-creating alarms for APIs 00:07:07
    6. Summary 00:03:00
  10. X-RAY
    1. AWS X-Ray 101 00:05:26
    2. Using X-Ray to trace Lambda executions 00:05:17
    3. Setting up custom X-Ray traces in Lambda functions 00:04:02
    4. AWS X-Ray limitations 00:04:49
  11. CORRELATION IDS
    1. Laying out the plan 00:03:33
    2. Auto-capturing incoming correlation IDs via HTTP headers 00:02:56
    3. Including all the captured correlation IDs in the logs 00:06:15
    4. Forwarding correlation IDs via HTTP headers 00:06:51
    5. Forwarding correlation IDs via Kinesis events 00:08:16
    6. Auto-capturing incoming correlation IDs via Kinesis events 00:08:49
    7. Enabling debug logging on individual user events 00:06:25
    8. Auto-capturing incoming correlation IDs via SNS messages 00:04:11
    9. Forwarding correlation IDs via SNS messages 00:03:40
    10. Summary 00:05:53
  12. PERFORMANCE
    1. Lifecycle of a Lambda function 00:03:48
    2. Strategies to minimize cold starts 00:11:00
    3. Taking advantage of container reuse for optimization 00:03:59
    4. Cost considerations 00:05:04
  13. ERROR HANDLING
    1. Lambda retry behaviors 00:05:02
  14. LAMBDA LIMITS
    1. Hard and soft limits for Lambda 00:03:15
    2. Other service limits 00:02:39
    3. How to request a soft limit raise 00:02:57
  15. MANAGING CONFIGURATIONS
    1. SSM Parameter Store 101 00:03:47
    2. Referencing SSM parameters in serverless.yml 00:06:06
    3. Limitations with Lambda environment variables 00:02:35
    4. Using Middy middleware to load SSM parameters at runtime 00:05:54
    5. Secrets Manager 101 00:05:23
    6. Using Middy middleware to load Secrets Manager secrets at runtime 00:03:26
    7. Considerations for advanced use cases 00:03:28
  16. VPC
    1. Configuring Lambda functions' access to a VPC 00:05:15
    2. When to use VPC and why you mostly shouldn’t 00:04:27
    3. You don’t need VPCs to secure your functions 00:06:09
    4. FunctionShield 00:05:20
    5. Encapsulating common middleware with a wrapper 00:07:34
  17. CANARY DEPLOYMENTS
    1. Why should we do canary deployments? 00:03:55
    2. Lambda weighted alias 101 00:02:33
    3. sls deploy with weighted alias 00:06:41
    4. Enabling auto-rollback during deployment 00:06:08
    5. Problems with weighted alias 00:03:24
    6. Problems with CodeDeploy 00:04:53
    7. Wrap up/Next 00:07:26