{"repo":"aws-samples/rest-api-gateway-jwt-cognito","free":true,"listed":false,"github":"https://github.com/aws-samples/rest-api-gateway-jwt-cognito","clone":"git clone https://github.com/aws-samples/rest-api-gateway-jwt-cognito.git","description":"CDK (TypeScript) sample on how to configure API Gateway (REST API) with JWT token auth via Amazon Cognito and Lambda Authorizers","language":"Python","stars":13,"topics":["api-gateway","api-rest","cognito","cognito-user-pool","docker","jwt","lambda","python3","cdk","typescript"],"license":"MIT-0","category":"auth-billing-email","readme_excerpt":"rest-api-gateway-jwt-cognito This sample shows how to integrate JWT token authorization with Amazon API Gateway utilizing AWS CDK. The flavor of API used in this sample is the REST API. The REST API type offers more endpoint types, more security features, better API management capabilities, and more development features when compared to the HTTP API type. More details about the comparison can be found in the documentation. To be able to use JWT authorization in your REST API, one additional component needs to be added. That is the authorizer Lambda function. This sample shows how to set up the authorizer function. In contrast, the HTTP API has native support for validating JWT tokens (no need to set up an authorizer function). There is another sample which demonstrates how that can be done too. The token issuing service used in this sample is Amazon Cognito. This solution is native to AWS, and there is no need to set up a separate JWT token issuer/service. Cognito handles User management and the generation of their tokens via User Pools. A notable advantage of using the REST API flavor (of API Gateway) is that it natively integrates with AWS WAF; and does not require additional components and/or configuration to get that working. Architecture The typical workflow would be that a client application (or a user) would request a JWT token from Cognito using credentials (such as a username and password). That token would then be supplied in the request header destined for the API ","default_branch":null,"files":null,"tree":[],"storefront":"/r/aws-samples","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/aws-samples/rest-api-gateway-jwt-cognito/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}