Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob

Adding AWS IoT Thing Parameters

Adding AWS IoT Thing Parameters

ChaitanyaV_61
Employee
Employee
50 questions asked 25 likes received 25 sign-ins

The MBED OS Example AWS IOT Client code example requires the information of AWS parameters to be added to the configuration files as one of its key steps. How can you add these? 


The MBED OS Example AWS IOT Client code example demonstrates the capabilities of PSoC 6 Wi-Fi BT Prototyping Kit to establish a connection with a cloud service provider such as Amazon Web Services (AWS) and be able to interact with an IoT Thing as a publisher or a subscriber.

AWS IoT is one such service in the wide array of services offered as part of AWS to bring together data management and rich analytics in easy to use services designed specifically for IoT data.

Register your device or IoT Thing by following this guide: Latest Developer Guide Register Device

To add these AWS parameters to the code example, navigate inside either the publisher or subscriber project directory and locate the file aws_config.h. It has the following fields:

                                                                                                                Figure 1

pastedImage_2.png

 

Do the following to edit the fields:

a) Obtain the AWS IoT Endpoint address by going to AWS IoT Console > Manage > Things, and then click on the Thing you created. Once the Thing is opened, click Interact on the side panel. 

Figure 2

pastedImage_3.png

Copy the endpoint address as highlighted in Figure 2 and replace it in the line containing #define for AWSIOT_ENDPOINT_ADDRESS.

b) Change the #define for AWSIOT_THING_NAME to the name of your registered Thing. In this example, the Thing that is created is called “AWS_Thing”.

c) If required, change AWSIOT_CLIENT_ID and AWSIOT_TOPIC. For this example, leave it as is.

d) Add the certificate keys. The mapping of the keys to the respective fields is as follows:

    • SSL_CLIENTCERT_PEM  ----> Certificate for the Thing
    • SSL_CLIENTKEY_PEM ----> Private key
    • SSL_CA_PEM ----> AmazonRootCA1 certificate

For example:

pastedImage_10.png

Note: Add “\” in each line because it is a multi-line string. Also, you must add “\n” wherever there is a new line; for example, after “BEGIN CERTIFICATE” to maintain the format of the certificate.

 

Author: DheerajK_81          Version: **

Translation - Japanese: AWS IoT Thingパラメーターの追加 - KBA228420 - Community Translated (JA)

0 Likes
816 Views