How to secure a REST API with Cognito User Pool and OAuth scopes

  Рет қаралды 1,206

Selvam Subbiah

Жыл бұрын

This is a step by step tutorial to configure Cognito User Pool as the authorizer for REST API in AWS. The focus is on creating a Resource Server a.k.a OAuth server in the Cognito User Pool to create custom OAuth scopes and protect the REST API endpoint using those OAuth scopes.
For those who like text, please check out this blog post - selvamsubbiah.com/how-to-integrate-api-gateway-and-cognito-user-pool-with-custom-oauth-scopes/
We will create a REST API using AWS Lambda and API Gateway, integrate it with Cognito User Pool and create custom OAuth scopes to authenticate and authorize the REST API endpoints.
Below are the steps to setup the REST API and OAuth authorization using Cognito User Pool -
1. Create a AWS Lambda function
2. Create a REST API in AWS API Gateway
3. Create a Cognito User Pool
4. Create a Resource Server and define custom scopes
5. Update the App Client with the custom scopes
6. Create an Authorizer in API Gateway
7. Configure the Authorizer and the custom OAuth scope for the API
8. Create a user in the Cognito User Pool
9. Test the API endpoint

Пікірлер: 3
@nicks.17
@nicks.17 4 ай бұрын
I've been working with Cognito for a while but using a custom Lambda authorizer. I've been wanting to experiment with scopes in a new application and this video really made it click. Great video, thank you!!
@selvam85
@selvam85 4 ай бұрын
Glad you found it helpful!
@user-wg2wt6xp1n
@user-wg2wt6xp1n 9 ай бұрын
Thank you so much finally done my task
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 9 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 57 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:26
CRAZY GREAPA
Рет қаралды 5 МЛН
Alex hid in the closet #shorts
00:14
Mihdens
Рет қаралды 9 МЛН