Amazon API Gateway REST API with an Amazon Cognito User Pools Authorizer

API Gateway REST API → Cognito → AWS Lambda

Create a REST API Gateway with a Cognito User Pools Authorizer for access control

This pattern deploys an Amazon API Gateway REST API endpoint that uses a Cognito User Pools Authorizer for access control.
It assumes that the Cognito User Pool already exists and takes the Cognito User Pool ARN as an input parameter which must be provided by the user.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Launch Stack

Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/cognito-restapi

Deploy

Deploy the stack: <code>sam deploy</code>.


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Albert Blaya

Albert Blaya

Albert is a Solutions Architect at Amazon Web Services based in Australia.

Follow on LinkedIn