API Gateway Authoisation And Authentication

IAM

Cognito user pools

  • Can use AWS Cognito for fully managed user lifecycle, token expires for Authentication
  • Must implementation authorisation in the backend
    Pasted image 20221015121933.png

Lambda Authorizer (formerly Custom Authorizers)

  • Good for third party authentication system
  • Token based bearer (JWT, OAuth) use AWS Lambda for authorisation
  • Request parameter-based authorizer via (header, query string, stage variables)
  • Lambda will then have to return the IAM policy for the user. Result policy is cached
    Pasted image 20221015122852.png