
Amazon Cognito is a fully-managed AWS service that allows us to identify and manage user access. It sounds similar to IAM, but these are actually two different services. With Amazon IAM, we can manage users who directly use AWS services, such as Solution Architect, Cloud Engineer, Backend Developer, DevOps Engineer, etc. Meanwhile, Amazon Cognito helps us manage “external” users, who do not directly use AWS services or use them indirectly.
Imagine you have an application and want to manage user permissions. The first step is to identify whether they are your users. Next, you create a “proof” for them to hold, so when they request something, they can present this “proof” and say, “I am a user of this application.” Then the server decides whether the user can access the resource or not. Instead of building a separate server for this, we can use Cognito to identify users in your application.
In this workshop, we will first learn about Cognito to ensure a basic understanding of the service. Then, we will apply this knowledge to practice. Before practicing with Cognito, we need to build a sample application with basic functionality for demonstration purposes. We will build this application in two different languages (explained in section 4, Building Sample Projects), including Javascript and Python, allowing you to choose your preferred language for practice.
After building the small application, we will test the results after integrating with Cognito. Finally, after testing, we will extend the source code to implement this module on the server side using Lambda and integrate it with API Gateway.
To give you an overview of this workshop, see the project architecture below:

We will have two users belonging to different teams, Marketing and Sales. For each request sent by these users, the system will check identity and function permissions for the two user groups based on the rules we define.
So what will you learn from this workshop?
After this workshop, you should understand how Authentication and Authorization are implemented in an application and be able to apply it to your own projects.
In this workshop, we will go through the following sections: