Developer Guide


The message broker supports clients connecting with the HTTP protocol using a REST API. Clients can publish by sending a POST message to <AWS IoT Endpoint>/topics/<url_encoded_topic_name>?qos=1".

For example, you can use curl to emulate sending a message. For example:

curl --tlsv1.2 --cacert root-CA.crt --cert 4b7828d2e5-certificate.pem.crt --key 4b7828d2e5-private.pem.key -X POST -d "{ \"message\": \"Hello, world\" }" ""

Use TLSv1.2 (SSL). curl must be installed with OpenSSL and you must use version 1.2 of TLS.

--cacert <filename>

The filename of the CA certificate to verify the peer.

--cert <filename>

The client certificate filename.

--key <filename>

The private key filename.


The type of request (in this case, POST).

-d <data>

The HTTP POST data you want to publish.


The URL. In this case, the REST API endpoint for the thing.

To find the endpoint for a thing, in the AWS IoT console, choose Registry to expand your choices. Choose Things, choose the thing, and then choose Interact.) After the endpoint add the port (:8443) followed by the keyword "topics", the topic and, finally, specify the quality of service in a query string (?qos=1).