Amazon Cognito to Amazon API Gateway private REST API

Amazon Cognito → API Gateway → VPC Link → AWS Fargate

This pattern shows how to authenticate and authorize requests to a private REST API Gateway with Amazon Cognito.

This sample project demonstrates how to use Amazon Cognito with a private AWS REST API Gateway to authenticate and authorize requests to a private HTTP endpoint hosted on a Network Load Balancer and ECS/Fargate.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

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

Deploy

cdk deploy --all


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: cdk destroy.

Created by:

Justin Plock

Principal Solutions Architect at AWS