https://github.com/willgarcia/aws-cognito-lambda
Lambda function authorizer for AWS API Gateway and Cognito
https://github.com/willgarcia/aws-cognito-lambda
auth0 aws aws-api-gateway aws-lambda aws-lambda-node cognito
Last synced: 3 months ago
JSON representation
Lambda function authorizer for AWS API Gateway and Cognito
- Host: GitHub
- URL: https://github.com/willgarcia/aws-cognito-lambda
- Owner: willgarcia
- Created: 2018-05-19T09:26:40.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-19T09:26:58.000Z (about 7 years ago)
- Last Synced: 2025-02-05T06:44:24.998Z (5 months ago)
- Topics: auth0, aws, aws-api-gateway, aws-lambda, aws-lambda-node, cognito
- Language: JavaScript
- Size: 2.16 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Cognito Lambda function
This lambda function is used as a custom authorizer for API Gateway. It:
* validates Cognito users' authentication.
* proxifies API GW calls to other lambdas functions## API Gateway configuration
To use this lambda function, you will have to:
* create a custom authorizer on your AWS Console API Gateway
* add the authorizer to each endpoint that needs to be secured (AWS Console > Resources > select endpoint / method > select "Method Request" > select the authorizer in "Authentication Settings")Every call to the API Gateway endpoints configured with the authorizer will require an authorization header containing an encrypted JWT token. See [Using Tokens with User Pools](http://docs.aws.amazon.com/cognito/latest/developerguide/amazon-cognito-user-pools-using-tokens-with-identity-providers.html) to generate a Cognito JWT ID token.
## Documentation
* [API Security](https://servicesmadesimpler.govnet.qld.gov.au/wiki/pages/viewpage.action?pageId=26970091)
* [Use Amazon API Gateway Custom Authorizers](http://docs.aws.amazon.com/apigateway/latest/developerguide/apigateway-integrate-with-cognito.html)