Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
Very good tutorial,thanks for making this video,much appreciated..
Thank you for the simple explanation of lambda authorizer
Thank you so much!It was exactly was I was looking for!You're amazing
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 ?
Please start a tutorial on AWS DevOps Guru
cognito user pool can be used instead of lambda autorizer??
Yes! You can use cognito user pool
hello sir, Can i have this lambda function code
import jsondef 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_responsedef 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'])
thank you for saving my time
Very good tutorial,thanks for making this video,much appreciated..
Thank you for the simple explanation of lambda authorizer
Thank you so much!
It was exactly was I was looking for!
You're amazing
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 ?
Please start a tutorial on AWS DevOps Guru
cognito user pool can be used instead of lambda autorizer??
Yes! You can use cognito user pool
hello sir, Can i have this lambda function code
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'])
thank you for saving my time