0

I have an AWS API Gateway which has many end points all of which are Authorized through a Cognito based Authorizer. So the Cognito is generating all the JWT tokens for me and I am using this Cognito Authorizer to Authenticate my end points.

I need a way where I want a Lambda to be acting as an Interceptor for each and every request(at least all the ones that are invoked post login by the user) to allow/deny the requests before it further processes the Lambdas which are proxied to(invoked to) the API Gateway.

I tried the triggers given by Cognito and that did not work to me.

Dhana
  • 505
  • 1
  • 8
  • 27

1 Answers1

0

You can have a CloudFront distribution in front of an API Gateway and associate CloudFront distribution with a Lambda@Edge function. CloudFront intercepts requests and responses at CloudFront edge locations.

Customizing at the edge with Lambda@Edge

dossani
  • 1,892
  • 3
  • 14
  • 23