AWS IoT Rule HTTS Endpoint Call

0

I have the SQL statement SELECT * FROM 'test/payload' set in my AWS IoT rule. MQTT Publish should be up. subject: test/payload, payload: {"data1:":"test1","data2":"test2","data3":"test3"} Set the HTTPS endpoint action in your AWS IoT rule. HTTPS endpoint: https://test.com/test/endpoint Header Key: X-Authorization-Client-Id / Header Value: test-auth-1 Header Key: X-Authorization-Client-Secret / Header Value: nsqlamsdmqwlrkn Header Key: Content-Type / Header Value: application/json

The server builds the https://test.com/test/endpoint API. @GetMapping("/endpoint") @PreAuthorize("hasAnyRole('Administrator', 'Test Device')") public void get_endpoint(@RequestBody string body){ log.info("get_endpoint : {}", body); }

@PostMapping("/endpoint")
@PreAuthorize("hasAnyRole('Administrator', 'Test Device')")
public void get_endpoint(@RequestBody string body){
    log.info("post_endpoint : {}", body);
}

MQTT messages must be posted. It is not possible to call the normal frequency of AWS IoT rules, where the most frequent HTTPS endpoint is requested.

  1. What did I set wrongly with the wrong settings? I call https://test.com/test/endpoint API and it works fine.
  2. How uniquely can I check logs for HTTPS End Point calls?

please answer about my question. thank you

已提問 1 年前檢視次數 336 次
1 個回答
1

The documentation explains how to setup topic rule destinations in order for the HTTP action to publish to your HTTP API. Please follow the instruction at https://docs.aws.amazon.com/iot/latest/developerguide/https-rule-action.html and https://docs.aws.amazon.com/iot/latest/developerguide/rule-destination.html to correctly setup your topic rule destination and confirm it has been successfully confirmed and enabled by AWS IoT Core.

AWS
專家
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南