Serverless Microservices on AWS in 10 Hours
3.8 (51 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
475 students enrolled

Serverless Microservices on AWS in 10 Hours

The perfect course to implementing cost-effective, and scalable Microservices and APIs using serverless computing on AWS
3.8 (51 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
475 students enrolled
Created by Packt Publishing
Last updated 11/2018
English
English [Auto-generated]
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 10 hours on-demand video
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Improve the reusability, composability, and maintainability of code
  • Create a highly available serverless microservice data API
  • Build, deploy and run your serverless configuration and code
  • Implement over 15 microservices architecture patterns without needing containers or EC2 instances
  • Speed up delivery, flexibility and time to market using serverless microservices
  • Add your microservices to a continuous integration & continuous delivery pipeline
Course content
Expand all 65 lectures 10:02:22
+ Building a Scalable Serverless Microservice REST Data API
23 lectures 02:46:13

This video gives an overview of the entire course.

Preview 09:34

There are many architectures that exist before Microservices. In this video, we will see what are they, what are the benefits and drawbacks, how do they compare to microservices.

  • See the overview of monolithic multi-tier architecture and Service Orientated Architecture (SOA)

  • See the overview of micsoservices architecture

  • See the benefits and drawbacks of monolithic and micsoservices architecture

Monolithic and Microservice Architectures
15:08

In this video, we will show where does serverless computing fit in with other public cloud offerings.

  • See the overview of virtual machines benefits and drawbacks

  • See the overview of container benefits and drawbacks

  • See the overview of serverless computing benefits and drawbacks

Virtual Machines, Containers, and Serverless Computing
13:08

In this video, we will see what the serverless computing offerings available in AWS are and how these service s fit together.

  • See the overview of the serverless managed services

  • See the example: how these can fit together to solve a data transformation task

Serverless Computing in AWS
10:38

In this video, we will set up a new user. Also, we will see how can I ensure that the user access is secure and how I setup my local serverless environment.

  • Use the AWS Management Console to setup a new user

  • Set up multi-factor authentication for a user

  • Set up your local environment credentials, AWS Python SDK and CLI

Setting Up Your Serverless Environment in AWS
11:21

In this video, we will see that with data breaches and compliance requirements security is a key consideration.

  • See the security Examples and impacts on an organization

  • Explain the security at rest, in transit, authentication, and authorization

  • Learn that AWS has a shared security responsibility model that should be followed

Overview of Security in AWS
05:52

In this video, we will see how can we configure AWS security to help secure user authorization and access to resources.

  • Explain AWS Identity and Access Management (IAM)

  • Learn IAM policies, users, groups to help secure your users

  • Explain IAM roles to help secure your trusted entity

Overview of AWS Identity and Access Management (IAM)
03:24

In this video, we will see how can we ensure that your microservice is secure and what are some of the best practices.

  • Explain Lambda security

  • Learn API gateway and DynamoDB security

  • Explain how to monitor and alert

Securing Your Serverless Microservice
05:45

In this video, we will see what is the architecture of serverless data provider API.

  • Make use of API gateway, Lambda, and DynamoDB

  • Overview of JSON and time series data

  • Explain about request/response data flows

Building a Serverless Microservice Data API
06:56

In this video, we will see how can I create my first Lambda function that parses the given URL parameters.

  • Setup the IAM policies and role

  • Write the Lambda code that parses the given URL parameters

  • Test the Lambda function works

Setting Up a Lambda in the AWS Management Console
10:52

In this video, we will configure the API gateway to call a Lambda function.

  • Create the API gateway resources and method

  • Integrate the GET method with Lambda

  • Test the API invoked the Lambda function correctly

Setting Up the API Gateway and Integrating It with a Lambda Proxy
06:05

In this video, we will see how can I create, add data to, and query my DynamoDB table.

  • Create a DynamoDB table using boto3

  • Insert data into DynamoDB

  • Query DynamoDB by partition and sort keys

Creating and Writing to a NoSQL Database Called DynamoDB
07:44

In this video, we will see how can I query DynamoDB from within a Lambda function.

  • Add the previous Lambda code that parses the given URL parameters

  • Add the previous code that queries DynamoDB by Partition and sort keys

  • Test the Lambda function with sample request data

Creating a Lambda to Query DynamoDB
03:17

In this video, we will see how the API Gateway, Lambda and DynamoDB integrate together and is it all working.

  • Understanding the integration

  • Test the data with a request URL

  • Understand the overall serverless microservices API

Connecting API Gateway, Lambda, and DynamoDB
04:25

In this video, we will see how we can make sure that the code is still running correctly and be more productive writing Lambda code.

  • See that testing allows better collaboration, improves product quality, and leads to shorter release cycles

  • Explain how unit tests help to verify that our functions work as expected

  • Mock to replace parts of the system under test

Unit Testing Your Python Lambda Code
09:10

In this video, we will see how can I simulate and debug a Lambda locally with real data without deploying it to AWS.

  • Use sample event data

  • Pass it into the Lambda function

  • Debug the Lambda code step by step

Running and Debugging Your AWS Lambda Code Locally
04:08

Once the Lambda function is deployed to AWS, this video explains how I can test it to make sure it’s running correctly.

  • Use sample event data

  • Submit the data via the AWS CLI

  • Make sure we get the expected response

Integration Testing Using Real Test Data
01:30

In this video, we will see how I know if my API is performing as expected with a low latency and how can I improve the latency.

  • Use Python Locust tool

  • Load test for concurrent users

  • See that the latency can be improved by changing DynamoDB and Lambda settings

Performance and End-to-End Testing at Scale
06:17

In this video, we will get to know that there are many challenges of provisioning infrastructure manually which include the cost, effort, lack of repeatable processes and limited scalability.

  • Use Infrastructure as a Code

  • Learn that serverless infrastructure and resources can be deployed using Serverless Application Model (SAM)

  • Learn that serverless infrastructure and resources can be deployed using the AWS CLI other frameworks

Overview of Serverless Stack Build and Deploy Options
07:26

In this video, we will get to know that resource and infrastructure need to be provisioned.

  • Create an S3 bucket for the Lambda deployment package

  • Deploy IAM policies for the Lambda function

  • Deploy IAM roles for the Lambda function

Creating an S3 Bucket, IAM Policies, and IAM Roles Resources
04:08

In this video, we will see what are the steps needed to prepare and deploy the serverless stack.

  • Create a Lambda deployment package

  • Create API gateway, lambda, and dynamo using SAM

  • Load data into DynamoDB

Building and Deploying API Gateway, Lambda, and DynamoDB
10:10

In this video, we’ll summarize what we have covered in this course.

Building a Scalable Serverless Microservice Data API Conclusions
06:15

In this video, we’ll have a quick look at what is going to be covered in the next course.

Next Course
03:00
Test Your Knowledge
5 questions
+ Implementing Serverless Microservices Architecture Patterns
42 lectures 07:16:09

This video gives an overview of the entire course.

Preview 12:13

In building serverless microservices how can we benefit from what is available from leading companies and open source communities.

  • Make use of design patterns

  • Use software design patterns and principles

  • Use and understand serverless  microservice pattern categories

Overview of Microservice Integration Patterns
07:55

How do we ensure efficient communication between microservices? How are microservices created and designed?

  • Understand synchronous versus asynchronous communication

  • Understand one-to-one and many-to-many communication microservice patterns

  • Understand  decomposition pattern by business capability

Communication Styles and Decomposition Microservice Patterns
13:18

What are the serverless microservice patterns that can leverage in AWS to reduce development, maintenance, and running costs?

  • Understand lambda event sources types

  • Understand lambda stream event sources

  • Leverage AWS managed services and serverless offerings in each category and use case

Serverless Computing to Implement Microservice Patterns
08:06

Lambda functions are stateless, so you need to store state externally which is best practice. What is important in distributed systems and what are the best ways to store state?

  • Understand that CAP Theorem stands for Consistency, Availability, and Partition tolerance and is important for data storage in distributed systems

  • Understand the shared  database and database per service patterns, and how they are used in distributed systems

  • Understand how these patterns can be implemented with DynamoDB, RDS, Aurora or Aurora serverless

Implementing Database Per Service and Shared Database Patterns
12:08

How can we expose data in DynamoDB externally?

  • Use API Gateway and a lambda function as a proxy

  • Create API methods such as GET and POST

  • Use the lambda function to shape the request into a DynamoDB query and parse the returned data for the API

Accessing DynamoDB from API Gateway Via a Lambda Function
13:24

Is there a simpler way to expose DynamoDB data externally?

  • Use API gateway direct DynamoDB integration

  • Use API gateway to  shape the query in the integration request step

  • Use API gateway to shape the response in the integration response step

Accessing DynamoDB Directly from API Gateway
11:50

How can I implement the transaction log trailing pattern?

  • Use DynamoDB streams

  • Use a lambda function to consume  the stream as an event source

  • Use a lambda to write the steam data to another table in DynamoDB

Implementing the Transaction Log Tailing Pattern
13:02

How can I implement the saga pattern as a serverless stack?

  • Use SNS and lambda combination

  • Use step functions to build up a state machine in JSON using the Amazon states language

  • Use step functions states to invoke lambda functions

Implementing the Saga Pattern
12:34

How can I ensure that my DynamoDB database is secure?

  • Enable encryption at rest

  • Enable the VPC endpoint

  • Use IAM policies that are locked down as much as possible to a specific table and with minimum permissions

Securing Your DynamoDB Databases
07:27

What are the main differences between relational and non-relational databases?

  • Understand the BASE versus ACID consistency models

  • Understand the  scalability for non-relational databases

  • Understand SQL flexibility for relational databases

Relational Versus Non-Relational Databases
13:30

What is a VPC and why is it needed?

  • Understand VPC is a virtual network isolated from other networks

  • Understand that a VPC contains one or more Subnets

  • You have to use a VPC to access RDS or Aurora from a Lambda function

Overview of Amazon Virtual Private Cloud
08:15

What are the main steps for setting up a VPC?

  • Create VPC and subnets

  • Attach an internet gateway and Egress only gateway

  • Configure the to route tables and associate it with the subnets

Setting Up Amazon Virtual Private Cloud for Accessing RDS and Aurora
05:28

What are the main steps to look out for when accessing RDS from your local network?

  • Configure you corporate or local firewall

  • Configure the route tables with your IP

  • Configure the VPC security groups with your IP

Setting Up RDS and Accessing It from Your Local Network
05:43

Why and how can a lambda access an RDS instance?

  • Access MySQL RDS from API gateway via a lambda function

  • Understand the code and configuration to set it up

  • Ensure the lambda role has a policy that allows it to attach and detach network interfaces within a VPC

Accessing RDS from API Gateway Via a Lambda Function
12:35

What are the main differences for a lambda to access Aurora over RDS MySQL?

  • Use the same code to access MySQL RDS, MySQL Aurora,  and Aurora Serverless

  • Understand that Aurora is clustered by default

  • Understand the  additional read replica database endpoint in Aurora

Accessing Aurora from API Gateway Via a Lambda Function
12:01

What are the main steps to ensure your RDS or Aurora databases communication is secure?

  • Understand RDS and Aurora encryption in transit code and configuration

  • Set up RDS or Aurora IAM database authentication

  • Use IAM database authentication to generate an authorization token rather than use a password

Securing Your RDS and Aurora Databases
14:20

We need a way to create an efficient API that can be consumed by third parties and abstract away the underlying complexities.

  • Understand API Gateway Pattern

  • Understand API Composition Pattern

  • Understand the benefits and drawback of API Composition Pattern

API Gateway and API Composition Patterns
06:15

What can we use to implement the API gateway and API composition patterns?

  • Understand Amazon Route 53 and use it as a sclable cloud DNS

  • Understand implement Amazon API Gateway and AWS Lambda

  • Use Amazon CloudFront and Amazon S3

Implementing the Serverless API Composition Patterns
06:12

How can we overcome the database persistence limitation such as lack of full history on row changes, and efficient distributed synchronisation/replication challenges?

  • Use the event sourcing pattern where every action is an event appended to an event store

  • Use the Command Query Responsibility Segregation (CQRS) pattern to split write and read methods

  • Understand that in CQRS, commands are methods that mutates state and queries are methods that return data

Event Sourcing and CQRS Patterns
11:47

What AWS managed services are core to architect the serverless event sourcing pattern?

  • Use Amazon Kinesis streams

  • Use Amazon DynamoDB

  • Use Amazon SQS

Architectures of the Serverless Event Sourcing Pattern
09:04

How can we implement the serverless event sourcing pattern?

  • Have API Gateway with or without a lambda proxy write to DynamoDB

  • Have API Gateway with or without a lambda proxy write to Kinesis Streams

  • Have API Gateway with or without a lambda proxy write to SNS or SQS. The lambda the uses CloudWatch trigger

Implementing the Serverless Event Sourcing Pattern
10:53

What AWS managed services are core to architect a serverless CQRS pattern?

  • Use Aurora, Aurora Serverless, or DynamoDB

  • Use SQS / SNS

  • Use Kinesis Streams and Kinesis Firehose

Architectures of the Serverless CQRS Pattern
11:35

How can we implement the serverless CQRS pattern command and event processor?

  • Have API gateway with or without a lambda proxy write to DynamoDB. Then a lambda writes to DynamoDB and Kinesis Firehose

  • Have API gateway with or without a lambda proxy write to SQS/SNS. Then a lambda writes to DynamoDB and Kinesis Firehose

  • Have API gateway with or without a lambda proxy write to Kinesis Streams. Then a Lambda writes to DynamoDB and Kinesis Streams write to Kinesis Firehose

Implementing the Serverless CQRS Pattern
09:38

How can we secure the serverless resources?

  • Use roles specific to the resource

  • Attach policies to the role

  • Specify the permitted actions on the resources in the policy

Securing Your Event Streams and Queries
08:09

Why is it important to monitor your microservices and what patterns are available to do so?

  • 1000s of microservices, governance, compliance, operational auditing, risk auditing, and so on

  • Use application metrics and health checks patterns

  • Use centralized logging, audit logging, and distributed tracing patterns

Monitoring and Observability Patterns
09:10

How can serverless application metrics and health check API patterns be implemented?

  • Use Amazon CloudWatch

  • Use a lambda triggered by CloudWatch to run health checks

  • Use a lambda to write the results of the check to CloudWatch metrics and set an Alarm that sends an email notification upon failure

Implementing Serverless Metrics and Health Check API Patterns
11:13

What are the different ways to send logs to CloudWatch logs?

  • Use API Gateway built-in logging or custom logging

  • Use Lambda print function, native logging or external JSON logging packages

  • For non-lambda microservice (e.g. traditional EC2 or container-based) use CloudWatch logs agent

Implementing the Serverless Centralized Logging Pattern
10:20

How can I monitor my AWS account activity?

  • Enable AWS CloudTrail

  • Push logs to CloudWatch logs, optionally have a lambda scan them for suspicious activity

  • Create Alarms that trigger on suspicious activates

Implementing the Serverless Audit Logging Pattern
06:46

How can I configure Lambda, DynamoDB and other microservices to send traces to X-Ray?

  • Enable built-in Lambda X-Ray integration with the correct policy

  • For Lambda and DynamoDB  in Python use aws-xray-sdk via xray_recorder begin and end, or decorators

  • For non-lambda services use aws-xray-daemon

Implementing the Serverless Distributed Tracing Pattern
06:03

How can I architect a serverless discovery and catalogue service?

  • For batch discovery use a lambda function that lists all resources, and persists results to DynamoDB

  • For near-real-time use AWS CloudTrail that sends logs to CloudWatch logs that a lambda scans, and persists results to DynamoDB

  • Expose the DynamoDB catalogue using API gateway via a Lambda proxy

Creating a Serverless Discovery Service and Catalogue
06:25

What are the focus and differences of Continuous Integration, and Continuous Delivery, and Continuous Deployment?

  • Use continuous Integration to focus on automating build and testing to detect issues early

  • Use Continuous Delivery to focus on automated release process with a human approval step for the production release

  • Use Continuous Deployment to focus on a fully automated release process without a human approval step for the production release

Continuous Integration and Continuous Delivery
16:00

What AWS managed services are used in a serverless CI/CD pipeline and what are they for?

  • Use IAM roles and polices for security and access

  • Use AWS CodeCommit for code version control. Use AWS CodeBuild to  manage build service

  • Use AWS CodePipeline for  continuous delivery, and as a service that helps you build a CI/CD  pipeline

Serverless Continuous Integration and Continuous Delivery Setup
06:09

How can you access AWS CodeCommit?

  • With Git credentials use HTTPS or SSH Keys

  • Generate them in IAM

  • Attach the CodeCommit access policy to the IAM User

Using CodeCommit for the Serverless Data API Code
06:55

How do you setup a CodeBuild project?

  • Use  source code from CodeCommit or GitHub

  • Use an IAM role for CodeBuild to access the AWS resources or code

  • Generate a personal access token to access GitHub over HTTPS

Using CodeBuild to Build-Test the Serverless Data API Stack
10:20

How can you create a CodePipeline?

  • Use An IAM role for CodePipeline to access the AWS resources or code

  • Setup CodePipeline stages

  • Configure each CodePipeline stage with one or more actions such as source, build, deploy, and approve

Using CodePipeline as CI/CD for the Serverless Data API Stack
12:46

How can you setup other CI/CD tools for serverless?

  • Use their YAML files

  • Use a Makefile

  • Use CloudFormation with SAM to build and deploy you serverless stack

Using Other CI/CD Solutions with the Serverless Data API Stack
13:55

When is it best to use serverless computing versus containers?

  • Look at your non-functional requirements

  • Use containers for very low latency < 50ms, large number of concurrent requests > 3000, large deployments packages and fixed costs

  • Use serverless when you require latency > 50ms, focus on business logic code, PAYG costs, and you are already on AWS

When to Use and Not Use Serverless Computing?
18:33

How can we estimate the serverless costs?

  • See the number of concurrent and average length of the requests

  • See data sizes and read/write capacities

  • Monitor costs in billing dashboard

Estimating Serverless Stack Costs
10:37

How do you scale database and event streaming resources?

  • Scale DynamoDB using GSI, creating a batch API and using DAX

  • Scale Aurora using read-replicas, DB optimization. Runload testing with production loads and monitor performance

  • Scale Kinesis Streams look at the number of consumers required, and load test by replying full production volumes

Database and Event Streaming Scalability
07:33

How do I ensure Lambda functions work at web scale?

  • Set lambda concurrency limits

  • Use lambda pre-warming to reduce their launch time

  • Use lambda code optimizations such as reducing package size, logging and declare objects outside  lambda_handler()

Web Scale Best Practices
14:25

This video concludes the entire course.

Conclusion
11:37
Test Your Knowledge
5 questions
Requirements
  • Basic knowledge of programming and AWS is required. Familiarity with DevOps will be beneficial, but not necessary.
Description

Microservices are a popular new approach to building maintainable, scalable, cloud-based applications. AWS is the perfect platform for hosting Microservices. Recently, there has been a growing interest in serverless computing due to the increase in developer productivity, built in auto-scaling abilities, and reduced operational costs.In combining both microservices and serverless computing, organizations will benefit from having the servers and capacity planning managed by the cloud provider, making them much easier to deploy and run at scale.

This comprehensive 2-in-1 course is a step-by-step tutorial which is a perfect course to implementing microservices using serverless computing on AWS. Build highly available microservices to power applications of any size and scale. Get to grips with microservices and overcome the limitations and challenges experienced in traditional monolithic deployments. Design a highly available and cost-efficient microservices application using AWS. Create a system where the infrastructure, scalability, and security are managed by AWS. Finally, reduce your support, maintenance, and infrastructure costs.

This training program includes 2 complete courses, carefully chosen to give you the most comprehensive training possible.

The first course, Building a Scalable Serverless Microservice REST Data API, covers practical solutions to building Serverless applications. In this course we show you how to build an end-to-end serverless application for your organization. We have selected a data API use case that could reduce costs and give you more flexibility in how you and your clients consume or present your application, metrics and insight data. We make use of the latest serverless deployment and build framework, share our experience on testing, and provide best practices for running a serverless stack in a production environment.

The second course, Implementing Serverless Microservices Architecture Patterns, covers implementing Microservices using Serverless Computing on AWS. In this course, We will show you how Serverless computing can be used to implement the majority of the Microservice architecture patterns and when put in a continuous integration & continuous delivery pipeline; can dramatically increase the delivery speed, productivity and flexibility of the development team in your organization, while reducing the overall running, operational and maintenance costs. By the end of the course, you’ll be able to build, test, deploy, scale and monitor your microservices with ease using Serverless computing in a continuous delivery pipeline.

By the end of this course, you will be able to build, test, deploy, scale, and monitor your APIs and microservices  with ease using serverless computing in a continuous delivery pipeline.

Meet Your Expert(s):

We have the best work of the following esteemed author(s) to ensure that your learning journey is smooth:

Richard T. Freeman, PhD currently works for JustGiving, a tech-for-good social platform for online giving that’s helped 25 million users in 164 countries raise $5 billion for good causes. He is also offering independent and short-term freelance cloud architecture & machine learning consultancy services. Richard is a hands-on certified AWS Solutions Architect, Data & Machine Learning Engineer with proven success in delivering cloud-based big data analytics, data science, high-volume, and scalable solutions. At Capgemini, he worked on large and complex projects for Fortune Global 500 companies and has experience in extremely diverse, challenging and multi-cultural business environments. Richard has a solid background in computer science and holds a Master of Engineering (MEng) in computer systems engineering and a Doctorate (Ph.D.) in machine learning, artificial intelligence and natural language processing. See his website for his latest blog posts and speaking engagements. He has worked in nonprofit, insurance, retail banking, recruitment, financial services, financial regulators, central government and e-commerce sectors, where he:

-Provided the delivery, architecture and technical consulting on client site for complex event processing, business intelligence, enterprise content management, and business process management solutions.

-Delivered in-house production cloud-based big data solutions for large-scale graph, machine learning, natural language processing, serverless, cloud data warehousing, ETL data pipeline, recommendation engines, and real-time streaming analytics systems.

-Worked closely with IBM and AWS and presented at industry events and summits, published research articles in numerous journals, presented at conferences and acted as a peer-reviewer.

-Has over four years of production experience with Serverless computing on AWS.

Who this course is for:
  • This course is for developers, architects, and DevOps administrators who would like to build and deploy serverless APIs and microservices with AWS for their organizations.