Skip to content

Commit d19cef7

Browse files
Adjusted Sample README to include a section on how to use Websockets with the pub-sub sample
1 parent 6fd0bc8 commit d19cef7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

samples/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,23 @@ To run the basic MQTT Pub-Sub use the following command:
9393
--topic <topic name>
9494
```
9595

96+
To run this sample using websockets, see below:
97+
98+
<details>
99+
<summary>(Websockets)</summary>
100+
101+
To run using Websockets, use the following command:
102+
103+
``` sh
104+
./basic-pub-sub --endpoint <endpoint> --topic <topic name> --ca_file <path to root CA1>
105+
--use_websocket --signing_region <signing_region>
106+
```
107+
108+
Note that using Websockets will attempt to fetch the AWS credentials from your enviornment variables or local files.
109+
See the [authorizing direct AWS](https://docs.aws.amazon.com/iot/latest/developerguide/authorizing-direct-aws.html) page for documentation on how to get the AWS credentials, which then you can set to the `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS`, and `AWS_SESSION_TOKEN` environment variables.
110+
111+
</details>
112+
96113
## PKCS#11 MQTT Pub-Sub
97114

98115
This sample is similar to the [Basic Pub-Sub](#basic-mqtt-pub-sub),

0 commit comments

Comments
 (0)