We went through 3 workshops and built a simple web application with the serverless model in the cloud. For our web application to authenticate, the functions are only used when the user is logged in. So in this workshop, we’ll learn about AWS Cognito - which provides authentication, authorization, and user management for web and mobile applications.
The architecture of the web application will look like this:
AWS Cognito allows us to easily build a flow of sign-in, sign-up, verify email, change password, reset password, etc., instead of having to build DB for users and do many things yourself like JWT, hash password, send mail verify,… This helps you focus on developing other features of the application. Users can log in directly with a username and password or through a third party like Facebook, Amazon, Google, or Apple.
The two main components of Amazon Cognito are User pools and Identity pools:
An Amazon Cognito user pool and identity pool used together: