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

asked a year ago325 views
1 Answer
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
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions