Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Hands-On Introduction to Authentication with Amazon Cognito
New
55 students

Hands-On Introduction to Authentication with Amazon Cognito

Hands-on guide to Amazon Cognito with Next.js, NestJS, JWT, OAuth 2.0, user pools, identity pools, and Lambda
Created byLukasz Kallas
Last updated 10/2026
English
English [Auto],

What you'll learn

  • Configure Amazon Cognito user pools, app clients, groups, MFA, and managed login
  • Add user registration and sign-in to a Next.js application using AWS Amplify
  • Understand ID, access, and refresh tokens, JWT claims, and OAuth 2.0 flows
  • Secure a NestJS REST API with Cognito token verification and authorization guards
  • Customize authentication using AWS Lambda triggers
  • Implement machine-to-machine authentication and temporary AWS access using identity pools

Course content

3 sections • 22 lectures • 5h 15m total length
  • Welcome!6:14
  • Join Our Community0:04
  • What is Cognito & Why to Use it8:59
  • Setup15:55

Requirements

  • No previous Amazon Cognito experience required
  • An AWS account with administrator-level access (or permissions for Cognito, Lambda, IAM, and S3)
  • Basic TypeScript, React, and Node.js knowledge is helpful but not required

Description

This hands-on course provides a practical introduction to user authentication and authorization with Amazon Cognito, AWS's managed identity service for web and mobile applications.

If you've ever wanted to add user registration, sign-in, secure API access, or machine-to-machine authentication to your application without building an entire authentication system yourself, this course is for you.

We focus on learning by doing. There are no lengthy theory-heavy presentations. Instead, we'll work directly with Amazon Cognito, build real applications using TypeScript, and explore how authentication and authorization work in practice.

We'll start by understanding what Amazon Cognito is, how it works, and the difference between user pools and identity pools.

Then we'll move straight into practice.

You'll create your first Cognito user pool using the AWS console, configure sign-up and sign-in settings, explore password policies and multi-factor authentication, and work with users, groups, and application clients.

We'll also explore Cognito's managed login experience before integrating authentication into a real Next.js application.

Throughout the course, you'll learn how to work with:

  • Amazon Cognito user pools and identity pools

  • User registration, sign-in, and account recovery

  • Cognito managed login

  • Multi-factor authentication (MFA)

  • User groups and application clients

  • Amplify Authenticator

  • ID, access, and refresh tokens

  • JSON Web Tokens (JWT)

  • Token verification with aws-jwt-verify

  • Group-based and scope-based authorization

  • AWS Lambda triggers

  • Custom token claims

  • Machine-to-machine authentication

  • Temporary AWS credentials

We'll build a Next.js application that allows users to register, sign in, and interact with authenticated functionality using AWS Amplify.

You'll see how Cognito issues tokens, what information those tokens contain, and how ID, access, and refresh tokens serve different purposes.

We'll then move to the backend and create a NestJS API that verifies Cognito access tokens using aws-jwt-verify.

Instead of simply checking whether someone is signed in, we'll explore how to enforce authorization rules using Cognito groups and OAuth scopes.

You'll learn how to protect API endpoints and connect your authenticated Next.js frontend to your NestJS backend.

But authentication doesn't stop at signing users in.

We'll explore how AWS Lambda triggers allow us to customize the authentication lifecycle, including pre sign-up validation, post confirmation processing, and token customization.

From there, we'll explore machine-to-machine authentication using OAuth 2.0 client credentials, resource servers, and custom scopes.

Finally, we'll look at Cognito identity pools and see how authenticated users can obtain temporary AWS credentials to access AWS resources without embedding long-lived credentials in an application.

We'll finish with practical security recommendations, an overview of Cognito pricing considerations, and a walkthrough of cleaning up the resources created throughout the course.

Everything is demonstrated using real AWS resources and TypeScript applications, with code examples provided so you can focus on understanding how the different pieces fit together.

By the end of this course, you'll understand how to integrate Amazon Cognito into a modern application, secure frontend and backend communication, verify tokens, enforce authorization rules, and work with both user-based and machine-to-machine authentication.

This course is a great fit if you are:

  • A frontend developer looking to add authentication to a web application

  • A backend developer who wants to secure REST APIs

  • A full-stack developer working with Next.js, Node.js, or NestJS

  • An AWS developer exploring managed identity services

  • A cloud engineer interested in authentication and authorization

  • Anyone wanting to understand Amazon Cognito through practical examples

Basic TypeScript, React, and Node.js knowledge is recommended, along with some familiarity with AWS and command-line tools.

No previous Amazon Cognito experience is required.

If you want a beginner-friendly, practical introduction to user authentication with Amazon Cognito, this course will take you from creating your first user pool to securing real applications and APIs.

No slides. Just practical, hands-on learning.

Who this course is for:

  • Frontend developers who want to add user registration and authentication to their applications
  • Backend developers interested in securing REST APIs with JWT and OAuth 2.0
  • AWS developers exploring Amazon Cognito user pools and identity pools
  • Cloud engineers interested in identity and access management for applications
  • Developers who want to implement authentication without building a custom identity system from scratch