Secure API Gateway with Lambda Authorizer | How to add Lambda Authorizer to API Gateway | Hands-On

Поділитися
Вставка
  • Опубліковано 3 січ 2025

КОМЕНТАРІ • 10

  • @nirmaltripathy3226
    @nirmaltripathy3226 4 місяці тому +1

    Very good tutorial,thanks for making this video,much appreciated..

  • @RakeshShivayyaGuttedar
    @RakeshShivayyaGuttedar 6 місяців тому

    Thank you for the simple explanation of lambda authorizer

  • @revandarth2680
    @revandarth2680 3 місяці тому

    Thank you so much!
    It was exactly was I was looking for!
    You're amazing

  • @ruqayafathma
    @ruqayafathma 2 місяці тому

    Thankyou so much for this video. Just one question, If a user is directly accessing this api url on browser, where he has to add the token ?

  • @sreevanireddy1709
    @sreevanireddy1709 4 місяці тому

    Please start a tutorial on AWS DevOps Guru

  • @chandhuchandra4159
    @chandhuchandra4159 6 місяців тому

    cognito user pool can be used instead of lambda autorizer??

    • @AWS-Made-Easy
      @AWS-Made-Easy  6 місяців тому

      Yes! You can use cognito user pool

  • @neha738
    @neha738 5 місяців тому +1

    hello sir, Can i have this lambda function code

  • @milanzmitrovic
    @milanzmitrovic 4 місяці тому +5

    import json
    def generate_policy(principal_id, effect, resource):
    auth_response = {
    'principalId': principal_id
    }
    if effect and resource:
    polici_document = {
    'Version': '2012-10-17',
    'Statement': [
    {
    'Action': 'execute-api:invoke',
    'Effect': effect,
    'Resource': resource
    }
    ]
    }
    auth_response['policyDocument'] = polici_document
    return auth_response
    def lambda_handler(event, context):
    token = event['authorizationToken']
    valid_token = 'xyz987'
    if token == valid_token:
    return generate_policy('user', 'Allow', event['methodArn'])
    else:
    return generate_policy('user', 'Deny', event['methodArn'])

    • @miliy84
      @miliy84 3 місяці тому +1

      thank you for saving my time