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

preguntada hace un año336 visualizaciones
1 Respuesta
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
EXPERTO
respondido hace un año

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas