1 個回答
- 最新
- 最多得票
- 最多評論
0
You can take the following steps to troubleshoot the authorizer:
- Verify token signature is disabled for the authorizer using the console or
aws iot describe-authorizer --authorizer-name NAME_OF_AUTHORIZER
- If you have multiple authorizers, verify the one you want to use is set as default
- Verify the authorizer response with
aws iot test-invoke-authorizer --authorizer-name NAME_OF_AUTHORIZER --token TOKEN_VALUE
- Test the lambda function using a sample event
Token and the signature can be sent as headers in the request or as query paramenters. For your case the authorizer lambda code must be written to handle query strings parameters.
A more exhaustive troubleshooting guide can be found here
相關內容
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 3 年前
Thank You so much for the response. I have done the following : 1.Added "Addpermission"API with the given command.
aws lambda add-permission --function-name FunctionName --principal iot.amazonaws.com --source-arn AuthorizerARn --statement-id Id-123 --action "lambda:InvokeFunction"
2.Verify Authorizer Response with the command aws iot test-invoke-authorizer --authorizer-name NAME_OF_AUTHORIZER --token TOKEN_VALUE
In AWS CLI gives the following error: aws: error: argument operation: Invalid choice, valid choices are:
And Postman API is still giving {message Forbidden} :( Note:Token Signature is up todate