Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Authenticate & Authorize Serverless APIs with Cognito
Rating: 4.3 out of 5(17 ratings)
909 students

Authenticate & Authorize Serverless APIs with Cognito

AWS serverless, Serverless Framework version 4, Rest APIs, Cognito User Pool and Cognito App Client, Testing APIs
Created byAshwin Morey
Last updated 11/2024
English
English [Auto],

What you'll learn

  • Configuring Cognito User Pool and Cognito App Client in Serverless YAML
  • Create and authenticate a user against the Cognito User Pool
  • Authorize your Serverless API using a JWT access token
  • Create and secure a Serverless API using Cognito

Course content

5 sections • 21 lectures • 1h 59m total length
  • Promo0:39
  • Application Walkthrough5:06

    Demonstrate a React front end that authenticates users with Cognito, including register, confirm signup, and login flows, using a stored access token to access a protected home API.

  • Introduction3:20

    Tools required to setup serverless framework for node.js in windows.

  • Configure and Setup AWS CLI3:08

    Configure the AWS CLI by creating an IAM user with administrator access, generating access keys, and running aws configure to set credentials, region, output, then verify with aws s3 ls.

  • Setup serverless framework and download boilerplate code4:33

    Install the serverless framework, download the boilerplate for an AWS Node.js http api template, and examine serverless.yml to define lambda functions, events, and resources for an API gateway integration.

  • Deploying and Testing an Api Gateway Endpoint - proxied to a lambda handler6:37

    Deploy and test a REST API behind an API gateway that proxies requests to a Lambda handler, then learn to secure it with Cognito authentication and authorization.

  • Exploring AWS Api Gateway Deployment2:44

    Explore the resources created by deploying a service to AWS, including a Rest API gateway with proxy integration and a Lambda function, and test the endpoint while viewing CloudWatch logs.

Requirements

  • Basic understanding of javascript and nodejs. Need to have an AWS account and acess to AWS console.

Description

In this course, you'll gain practical experience in creating, deploying, and testing REST APIs on AWS using Node.js, a popular server-side JavaScript runtime. We start by introducing the basics of AWS services, focusing on Amazon Cognito, where you’ll learn to configure a Cognito User Pool and Cognito App Client. This setup is crucial for managing user authentication and access control, ensuring that your application remains secure.


You will then move on to constructing REST APIs in Node.js, focusing on creating users and authenticating them within your application. A significant part of the course will involve writing and refining a serverless.yml file, which is central to deploying your APIs in a serverless environment on AWS. This file allows you to define your functions, resources, and permissions in a declarative manner, making deployment and management easier.


As you progress, you’ll integrate Cognito with your REST APIs to handle both authentication and authorization, ensuring that your APIs are secure and only accessible to authorized users. By the end of this course, you will have a solid understanding of how to build, deploy, and secure serverless REST APIs on AWS, using Node.js and the Serverless Framework.  Looking forward to meeting you in this course.

Who this course is for:

  • Beginners or Students looking to learn more on securing REST APIs using AWS Cognito.