AWS Lambda in Motion
Operational Best Practices
Yan Cui
  • Course duration: 1h 38m
    Estimated full duration: 7h
  • MEAP began December 2017
  • Publication in Summer 2018 (estimated)

See it. Do it. Learn it! AWS Lambda in Motion introduces you to leading patterns and practices for creating operationally sound serverless applications using AWS Lambda, API Gateway, and Kinesis. You'll enjoy the professionally-produced video instruction from AWS expert Yan Cui, along with live exercises, text-based navigation, and the other innovative features built into Manning's liveVideo platform.

AWS Lambda in Motion 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!

Table of Contents detailed table of contents

Introduction

Introduction to course

AWS Lambda 101

Serverless framework 101

Managing permissions for the Serverless framework

Building API with API Gateway and Lambda

Creating landing page

Creating the restaurants API

Displaying restaurants in the landing page

How to secure APIs in API Gateway

Securing get restaurants endpoint with IAM-authorization

Cognito 101

Securing API endpoints with Cognito User Pools

Leading practices for API Gateway

Summary

Testing

Why AWS Lambda requires a different approach to testing

Authoring integration and acceptance tests

Run and debug functions locally with the Serverless framework

Run and debug functions locally with SAM local

Summary

Process real-time events with Kinesis & Lambda

Publish and consume Kinesis events

Dealing with partial failures

Leading practices for using Kinesis and Lambda

Logging

Push CloudWatch Logs to Elasticsearch

Auto-subscribe new log groups

Auto-update retention policy for new log groups

Monitoring

Track custom metrics with CloudWatch

How to monitor functions with IOPipe

Trade-offs between CloudWatch and IOPipe

Track metrics asynchronously

Track memory usage and billed times

Automatically create common alerts for APIs

X-Ray

AWS X-Ray 101

Use X-Ray to trace Lambda executions

Set up custom X-Ray traces in Lambda functions

AWS X-Ray Limitations

Correlation IDs

Capture and forward correlation IDs through HTTP

Capture and forward correlation IDs through SNS

Capture and forward correlation IDs through Kinesis

CI/CD

Setup a CI/CD pipeline for deploying Lambda functions

Leading practices

Performance

Life cycle of a Lambda function

How does language and memory size affect coldstart time?

Take advantage of container reuse for optimization

Use recursive functions to process long-running tasks

Cost considerations

Error Handling

Lambda retry behaviours

Use Dead Letter Queue (DLQ) for Lambda

Lambda Limits

Hard and soft limits for Lambda

How to request soft limit raises

Managing Configurations

Lambda environment variables

Limitations with Lambda environment variables

Use SSM Parameter Store to manage configuration values

Creating a config client

VPC

Configure Lambda functions access to VPC

When you should

Why you shouldn’t

Canary deployments

Why should we do canary deployments?

How can we implement canary deployments?

What are weighted alias?

Introducing API Gateway canary releases

Security

OWASP top 10

Injection attacks against Lambda functions

XSS attacks against Lambda functions

How attackers can steal your AWS credentials via dependencies

DOS attacks

Apply principle of least privilege

Apply per-function policies

Protecting your AWS credentials

Leading practices

Leading practices

Lambda

API Gateway

Kinesis

Step Functions

AWS Step Functions 101

Use Step Functions to chain Lambda invocations

Handle errors and retries

Design Patterns

Pub-sub

Push-pull (aka fan-out/fan-in)

Decoupled invocation

Saga

About the subject

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!

Prerequisites

For developers with some experience building cloud-based applications on AWS.

What you will learn

  • 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

About the instructor

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.


Manning Early Access Program (MEAP) Watch raw videos as they are added, and get the entire course, complete with transcript and exercises, when it is finished.
Buy
MEAP liveVideo $79.99