跳到主要內容

AWS IoT Tutorial


Create & define your thing in AWS IoT console
 
 
This article is divided into two sections as below:
  • How to configure AWS IoT
  • How to test it
 

 

How to configure AWS IoT

 
First, go to Registry\Things page
 
Give a name for your thing.



 
 
 
 Go to Security page and generate your certificate
 
 
If done, your will see the detail of your certificate like:
 
Download your certificates, active it, and then attach a policy. 

 


If you don't have any policy, you must create one for your thing.


Click Create new policy button.
 
Specify the policy name and action, and check the Allow option.
 
 
If done, your will see the policy information your specified.


 
Now you need to go to the security page, and attach your policy and thing.
 
 
 
If everything is ok, you will see like
 

 
 
 

How to test it

 
First, Install MQTT.fx and then configure the connection setting
 
 
Specify broker address, port, and client ID.

 
 
 
Broker address is your endpoint.
 
 
Configure SSL\TLS:
  • Enable SSL
  • Choose Self signed certificates option
  • Check PEM Formatted
  • Specified the path of certificates
 
 
In Step 4. you need to specify the path of root CA file, client certificate file and private key file you created before.


Click apply and ok to save your change
 
Connect your device

 
 Specified a topic you want to subscribe
 
 
 
In the publish page: specify a topic and a message you want to send.
And then publish it.
 
 
 
 
 
 
 If everything is ok, you will see the message in subscribe page like
 
 
 

BTW, if you don't know your thing's app endpoint, you can go to Registry\Your thing\Activity\MQTT Client\
 
 
and click view endpoint to see it

 
 
 
 
 





留言