Working with IoT API{Message Forbidden}

0

I am getting a {message Forbidden} error while I am trying to send HTTP request to IoT core using Postman. I get the device data endpoint address using the command below using AWS cloudshell. aws iot describe-endpoint --output text --endpoint-type iot:Data-ATS URL for posting the request in Postman is below: https://device_data_endpoint_address:443/topics/test/cust-auth/topic?qos=0&actionToken=allow

질문됨 일 년 전457회 조회
1개 답변
0

You can take the following steps to troubleshoot the authorizer:

  1. Verify token signature is disabled for the authorizer using the console or aws iot describe-authorizer --authorizer-name NAME_OF_AUTHORIZER
  2. If you have multiple authorizers, verify the one you want to use is set as default
  3. Verify the authorizer response with aws iot test-invoke-authorizer --authorizer-name NAME_OF_AUTHORIZER --token TOKEN_VALUE
  4. 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
전문가
답변함 일 년 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠