AWS API Gateway | Lambda and Cognito Authorizers

Поделиться
HTML-код
  • Опубликовано: 7 сен 2024

Комментарии • 14

  • @PenguinSpdSlayeR
    @PenguinSpdSlayeR 4 месяца назад +3

    A lot of videos doing this out there, but this one saved me! Most people skip something that we are stuck on, congrats.

  • @Litost-jj2no
    @Litost-jj2no 6 месяцев назад +2

    the best possible video, neither the documentation nor the videos of the AWS channel were useful, but with this video I was able to solve everything and understand it correctly, thank you very much.

  • @singh_king3868
    @singh_king3868 8 месяцев назад +1

    Such a great video!! well explained...hope we have one video on Cognito User Pool + Application Load Balancer

  • @saadalam9663
    @saadalam9663 Год назад +1

    Nice video, easy explanation good work 👍

  • @rainbowwonderland7659
    @rainbowwonderland7659 5 месяцев назад

    Easy to follow. But I find the token things at the end is quite confusing. Would be good if you could make another video to explain how the token works.

    • @listentolearn2363
      @listentolearn2363  4 месяца назад

      Thanks. Please let me know which part is confusing, I could try and explain here.

  • @ArgKilljoy
    @ArgKilljoy Год назад

    Hi - I have one question. After adding the Cognito authorizer, I'm getting a CORS error when calling the API from my localhost. If I call the API from Postman it works fine, though. Do you know what I may need to configure? My API "get" method triggers a Lambda function. Thank you

    • @listentolearn2363
      @listentolearn2363  Год назад +1

      Hi Carlos,
      Have you tried enabling CORS and updating the response headers?
      Please ensure you deploy api after the change.
      Below are few ways to add it based on your preference,
      docs.aws.amazon.com/apigateway/latest/developerguide/how-to-cors-console.html
      docs.aws.amazon.com/apigateway/latest/developerguide/set-up-gateway-responses-in-swagger.html?shortFooter=true
      github.com/serverless/serverless/issues/3896#issuecomment-326721971
      sergeygultyayev.medium.com/aws-serverless-how-to-fix-cors-for-custom-lambda-authorizer-ef6680e4f03#:~:text=When%20this%20flag%20is%20set,headers%20into%20the%20response%20object.

    • @ArgKilljoy
      @ArgKilljoy Год назад

      ​@@listentolearn2363 Thank you! I had enabled it.
      I ultimately checked headers in the Lambda response. I then deleted the current Options method and generated it again by enabling cors.
      I also didn't add an authorizer to the Options method, as I understand it does not need to have one.
      It then started working. Not sure which of these steps did it. But I'm ready to move on for now. lol

    • @engin_karatas
      @engin_karatas Год назад

      give cors "*"