this repository is to help you send messages to aws iot core with detailed steps, follow step by step this guide assumes you already have aws account
- click on services and select iot core
- on the left panel it shows monitor, onboard, manage ...
- click on manage -> things -> create (top right) -> create single new thing -> give suitable name -> Next
- select create certificate and download all certificatess except public key (which isnt useful for connection)
- Below you will see root CA for AWS IoT -> click download (it redirects you to secure CA) -> click on Amazon Root CA 1
- right click and save it by the same name as it displays
- Go back to from where you downloaded the certificates -> click activate
- Click attach policy
(if you already have created policy then select one of them and click register thing )
(if you havent done it, then simply click register thing - Go to secure tab in left panel -> click policies -> create -> give suitable name
- under add statements -> under action -> write iot:* -> under resource arn -> write * -> check allow (under effect)
- click create.
- now go back to where you create a thing (i.e., things under manage in side panel) -> select the thing -> go to security -> select the certificate
- top right click on actions -> attach policy -> select the policy -> click attach
: put all certificates to certificates folder and edit their extensions as shown in code above : the code is present in the same directory as that of certificates or vice versa and hence the path c://users has not been added