Skip to content

Commit b5347eb

Browse files
authored
Improvements in demo instructions of README for Jobs, Defender and Shadow demos (#1497)
* Improvements for demo instructions in README
1 parent 3d9a8d4 commit b5347eb

File tree

1 file changed

+27
-8
lines changed

1 file changed

+27
-8
lines changed

README.md

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
* [Prerequisites](#prerequisites)
4141
* [Build Dependencies](#build-dependencies)
4242
* [AWS IoT Account Setup](#aws-iot-account-setup)
43-
* [Configuring TLS mutual authentication in demos](#configuring-tls-mutual-authentication-in-demos)
43+
* [Configuring mutual authentication demos of MQTT and HTTP](#configuring-mutual-authentication-demos-of-mqtt-and-http)
44+
* [Configuring AWS IoT Device Defender and AWS IoT Device Shadow demos](#configuring-aws-iot-device-defender-and-aws-iot-device-shadow-demos)
4445
* [Configuring the S3 demos](#configuring-the-s3-demos)
4546
* [Setup for AWS IoT Jobs demo](#setup-for-aws-iot-jobs-demo)
4647
* [Prerequisites for the AWS Over-The-Air Update (OTA) demos](#prerequisites-for-the-aws-over-the-air-update-ota-demos)
@@ -322,20 +323,20 @@ Dependency | Version | Usage
322323
You need to setup an AWS account and access the AWS IoT console for running the AWS IoT Device Shadow library, AWS IoT Device Defender library, AWS IoT Jobs library,
323324
AWS IoT OTA library and coreHTTP S3 download demos.
324325
Also, the AWS account can be used for running the MQTT mutual auth demo can be run against AWS IoT broker.
325-
Also, running the AWS IoT Device Defender, AWS IoT Jobs and AWS IoT Device Shadow library demos require the setup of a Thing Name resource for the device running the
326+
Also, running the AWS IoT Device Defender, AWS IoT Jobs and AWS IoT Device Shadow library demos require the setup of a Thing resource for the device running the
326327
demo.
327328
Follow the links to:
328-
[Setup an AWS account](https://portal.aws.amazon.com/billing/signup#/start).
329-
[Sign-in to the AWS IoT Console](https://aws.amazon.com/console/) after setting up the AWS account.
330-
[Create a Thing resource](https://docs.aws.amazon.com/iot/latest/developerguide/iot-moisture-create-thing.html)
329+
- [Setup an AWS account](https://portal.aws.amazon.com/billing/signup#/start).
330+
- [Sign-in to the AWS IoT Console](https://aws.amazon.com/console/) after setting up the AWS account.
331+
- [Create a Thing resource](https://docs.aws.amazon.com/iot/latest/developerguide/iot-moisture-create-thing.html).
331332

332333

333-
#### Configuring TLS mutual authentication in demos
334+
#### Configuring mutual authentication demos of MQTT and HTTP
334335

335336
You can pass the following configuration settings as command line options in order to run the mutual auth demos:
336337

337338
```sh
338-
cmake .. -DAWS_IOT_ENDPOINT="aws-iot-endpoint" -DROOT_CA_CERT_PATH="root-ca-path" -DCLIENT_CERT_PATH="certificate-path" -DCLIENT_PRIVATE_KEY_PATH="private-key-path"
339+
cmake .. -DAWS_IOT_ENDPOINT="<your-aws-iot-endpoint>" -DROOT_CA_CERT_PATH="<your-path-to-root-ca-cert>" -DCLIENT_CERT_PATH="<your-client-certificate-path>" -DCLIENT_PRIVATE_KEY_PATH="<your-client-private-key-path>"
339340
```
340341

341342
In order to set these configurations manually, edit `demo_config.h` in `demos/mqtt/mqtt_demo_mutual_auth/` and `demos/http/http_demo_mutual_auth/` to `#define` the following:
@@ -345,6 +346,24 @@ In order to set these configurations manually, edit `demo_config.h` in `demos/mq
345346
* Set `CLIENT_CERT_PATH` to the path of the client certificate downloaded when setting up the device certificate in [AWS IoT Account Setup](#aws-iot-account-setup).
346347
* Set `CLIENT_PRIVATE_KEY_PATH` to the path of the private key downloaded when setting up the device certificate in [AWS IoT Account Setup](#aws-iot-account-setup).
347348

349+
#### Configuring AWS IoT Device Defender and AWS IoT Device Shadow demos
350+
351+
To build the AWS IoT Device Defender and AWS IoT Device Shadow demos, you can pass the following configuration settings as command line options:
352+
353+
```sh
354+
cmake .. -DAWS_IOT_ENDPOINT="<your-aws-iot-endpoint>" -DROOT_CA_CERT_PATH="<your-path-to-amazon-root-ca>" -DCLIENT_CERT_PATH="<your-client-certificate-path>" -DCLIENT_PRIVATE_KEY_PATH="<your-client-private-key-path>" -DTHING_NAME="<your-registered-thing-name>"
355+
```
356+
357+
An Amazon Root CA certificate can be downloaded from [here](https://www.amazontrust.com/repository/).
358+
359+
In order to set these configurations manually, edit `demo_config.h` in `demos/mqtt/mqtt_demo_mutual_auth/` and `demos/http/http_demo_mutual_auth/` to `#define` the following:
360+
361+
* Set `AWS_IOT_ENDPOINT` to your custom endpoint. This is found on the *Settings* page of the AWS IoT Console and has a format of `ABCDEFG1234567.iot.us-east-2.amazonaws.com`.
362+
* Set `ROOT_CA_CERT_PATH` to the path of the root CA certificate downloaded when setting up the device certificate in [AWS IoT Account Setup](#aws-iot-account-setup).
363+
* Set `CLIENT_CERT_PATH` to the path of the client certificate downloaded when setting up the device certificate in [AWS IoT Account Setup](#aws-iot-account-setup).
364+
* Set `CLIENT_PRIVATE_KEY_PATH` to the path of the private key downloaded when setting up the device certificate in [AWS IoT Account Setup](#aws-iot-account-setup).
365+
* Set `THING_NAME` to the name of the Thing created in [AWS IoT Account Setup](#aws-iot-account-setup).
366+
348367
#### Configuring the S3 demos
349368

350369
You can pass the following configuration settings as command line options in order to run the S3 demos:
@@ -382,7 +401,7 @@ The following creates a job that specifies a Linux Kernel link for downloading.
382401
aws iot create-job \
383402
--job-id 'job_1' \
384403
--targets arn:aws:iot:us-west-2:<account-id>:thing/<thing-name> \
385-
--document '{\"url\":\"https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.5.tar.xz\"}'
404+
--document '{"url":"https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.8.5.tar.xz"}'
386405
```
387406

388407

0 commit comments

Comments
 (0)