How-To Guides
Integration Guides

Amazon AWS IoT Core over SSL Integration Guide

15min
review the following guide to set up an integration between litmus edge and aws iot core with ssl authentication before you begin you must have an aws account with the appropriate user privileges set up integration in aws step 1 onboard device to onboard a device open the aws iot browser tab and click manage > things the things pane appears from the left pane, click onboard the connect to aws iot pane appears from the onboard a device box, click get started the connect to aws iot wizard appears click get started the how are you connecting to aws iot screen appears from the choose a platform section, select linux/osx from the choose a aws iot device sdk section, select java , and then click next the register a thing screen appears in the name field, enter thing1 , and then click next step the download a connection kit screen appears click linux/osx , view the downloaded zip file at the bottom of the screen, and then click next step the configure and test your device screen appears view the downloaded zip file at the bottom of the screen, and then click done the connected successfully screen appears click done the named thing1 appears in the things pane step 2 create policy to create the policy from the left pane in the aws things pane, click secure > policies refresh the page the named thing1 policy appears step 3 create and download certificate and private key you will need to download the certificate and private key that you will use to configure the aws connector in step 8 to create and download the certificate and private key from the left pane, click certificates the certificate for the named thing appears click the actions icon for the certificate, and select delete the confirmation dialog box appears click yes, continue with delete refresh the page the certificates wizard appears click create a certificate the create a certificate screen appears click create certificate the certificate created screen appears click download next to a certificate for this thing click download next to a private key click keep next to the downloaded files click activate , and then click attach a policy the add authorization to certificate screen appears select the named thing1 policy , and then click done step 4 edit policy to edit the policy from the left pane, click policies the policies pane appears click the named thing1 policy the named thing1 policy dialog box appears click edit policy document the edit policy screen appears scroll down the policy document, copy the last line, paste the copied line below, and edit it as follows change sdk nodejs to sdk golang click save as new version click the back arrow to return to the policies pane set up integration in litmus edge after setting up your aws account, you will need to log in to litmus edge to complete the steps below and complete the integration step 5 add device follow the steps to connect a device docid 3eyafppweuvmblcey17sq the device will be used to store tags that will be eventually used to create outbound topics in the connector make sure to select the enable data store checkbox step 6 add tag to device after connecting the device in litmus edge, you can add tags docid 8se7z3pmrfwl1nmzcwalx to the device create tags that you want to use to create outbound topics for the connector step 7 retrieve parameters for aws connector you will have to log in to your aws account to retrieve the parameters for the aws connector to retrieve the parameters log in to your aws account open the aws iot browser tab and click manage > things the things pane appears click thing\[#] the thing\[#} dialog box appears from the left pane, click interact the pane changes to reflect your selection copy the rest api endpoint under the https section this is the hostname parameter for the aws connector click secure > policies the policies pane appears click thing\[#] policy the thing\[#] policy dialog box appears scroll to the bottom and copy sdk resource to your clipboard for this use case, the sdk resource is sdk golang this is the client id parameter for the aws connector copy the first topic value in this use case, the topic is topic 1 this the integration topic value step 8 add aws iot core connector follow the steps to add a connector docid\ ogw7fkqbwidbabn4wl5rr and select the mqtt amazon aws iot core over ssl provider configure the following parameters name enter a name for the connector hostname paste the rest api endpoint value copied in step 6 port enter the mqtt broker port the default value is 8883 certificate paste the downloaded certificate in step 3 private key paste the downloaded private key in step 3 client id paste the sdk resource copied in step 6 qos confirm that the default value 0 is entered the quality of service (qos) level is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for a specific message parallel publish count the number of messages being published simultaneously once the defined limit has been reached, subsequent messages are silently dropped the default value is 100 integration topic paste the topic value copied in step 6 lwt topic the topic for last will and testament feature of mqtt lwt payload the payload for last will and testament feature of mqtt lwt payload type the payload type for mqtt's last will and testament feature the options are string and base64 lwt qos the quality of service value for mqtt's last will and testament feature lwt retained select this check box to retain the value for mqtt's last will and testament feature throttling limit the maximum number of messages per second to be processed the default value is zero, which means that there is no limit persistent storage when enabled, this will cause messages to undergo a store and forward procedure messages will be stored within litmus edge when cloud providers are online queue mode select the queue mode as lifo (last in first out) or fifo (first in first out) selecting lifo means that the last data entry is processed first, and selecting fifo means the first data entry is processed first step 9 enable the connector after adding the connector, click the toggle in the connector tile to enable it if you see a failed status, you can review the manage connectors docid 3u7jzldinehy8shvifd d and relevant error messages step 10 create topics for connector you will now need to create topics for the connector to create outbound topics, you have the option of importing the tag created in step 6 to create inbound topics, you will have to manually create the topic create outbound topics to create outbound topics click the connector tile the connector dashboard appears click the topics tab click the import from devicehub tags icon the devicehub import dialog box appears select all the tags to import and click import create inbound topics before creating inbound topics, copy the raw topic for tags that you want used for topics see manage tags docid\ g9roompc3xz4zq6cbnonc for more information to create inbound topics click the connector tile click the topics tab click the add a new subscription icon the data integration dialog box appears configure the following parameters data direction select remote to local inbound local data topic paste the raw topic copied for the device tag remote data topic confirm the topic where the data is pushed enable select the toggle to enable the topic click yes to add the topic step 11 enable topics ensure the topics you imported are enabled by returning to the topics tab and clicking the enable all topics icon step 12 verify outbound messages you will need to log in to your aws account to verify that outbound messages are being sent to verify outbound messages log in to your aws account navigate to the aws things pane and click monitor the monitor pane appears select hour from the time range drop down list the charts change to reflect your selection click the browser refresh to refresh the page the successful connections chart shows a connection scroll down to the messages published chart the messages published chart shows messages arriving step 13 view outbound messages in litmus edge flow you can create a flow in litmus edge to view the outbound messages to create a flow follow the steps to create a flow docid\ veyyte7xdcangglzbqya0 and add the following nodes datahub subscribe debug double click the datahub subscribe node the edit datahub subscribe node dialog box appears paste the local topic you created in step 9 if needed, configure the datahub subscribe connection see the "step 3 configure connector nodes" section in create a flow docid\ veyyte7xdcangglzbqya0 to learn more click done , and then click deploy click the debug tab see the additional options section in manage the flow canvas docid\ i2ybjij6sj8euryhjnpko for more details verify that test message appears in the debug results you can return to aws monitor browser tab and view the messages published chart to see the outbound messages are being sent