Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Dec 5, 2023
1 parent 55f60c6 commit 2fea746
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 204 deletions.
9 changes: 7 additions & 2 deletions samples/mqtt/websocket_connect/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ then you will need to replace part of the sample (connection\_setup function) wi

* [Websocket Connect/custom auth](./README_custom_auth.md)
* [Websocket Connect/username and password](./README_username_password.md)
* [Websocket Connect/proxy](./README_proxy.md)
* [Websocket Connect/static credentials](./README_static_credentials.md)

Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html) must provide privileges for this sample to connect. Below is a sample policy that can be used on your IoT Core Thing that will allow this sample to run as intended.
Expand Down Expand Up @@ -48,7 +47,13 @@ For this sample, using Websockets will attempt to fetch the AWS credentials to a

## How to run

To run the websocket connect use the following command:
To use a proxy server which is optional pass the following arguments

Optional parameters:
```
--proxy_host <str>
--proxy_port <int>
```

``` sh
./websocket-connect --endpoint <endpoint> --signing_region <signing region>
Expand Down
15 changes: 10 additions & 5 deletions samples/mqtt/websocket_connect/README_custom_auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@

[**Return to main sample list**](../../README.md)

This sample makes an MQTT connection via Websockets and then disconnects.
On startup, the device connects to the server via Websockets then disconnects right after.
This sample demonstrates connecting via custom auth authorizer username,
password and tokens
This sample makes an MQTT connection and connects through a Custom Authorizer.
On startup, the device connects to the server and then disconnects.
This sample is for reference on connecting using a Custom Authorizer.
Using a Custom Authorizer allows you to perform your own authorization using an AWS Lambda function.
See Custom Authorizer for more information.
You will need to setup your Custom Authorizer so that the lambda function returns a policy document.
See this page on the documentation for more details and example return result.
You can customize this lambda function as needed for your application to provide your own security measures based on the needs of your application.
Your IoT Core Thing's Policy must provide privileges for this sample to connect.
Below is a sample policy that can be used on your IoT Core Thing that will allow this sample to run as intended.

If you want to use simple or custom auth (or static creds, or basic auth, etc) instead,
then you will need to replace part of the sample (connection\_setup function) with a code snippet we provided in its corresponding readme.

* [Websocket Connect/simple_auth](./README.md)
* [Websocket Connect/username and password](./README_username_password.md)
* [Websocket Connect/proxy](./README_proxy.md)
* [Websocket Connect/static credentials](./README_static_credentials.md)

Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html) must provide privileges for this sample to connect. Below is a sample policy that can be used on your IoT Core Thing that will allow this sample to run as intended.
Expand Down
108 changes: 0 additions & 108 deletions samples/mqtt/websocket_connect/README_proxy.md

This file was deleted.

3 changes: 0 additions & 3 deletions samples/mqtt/websocket_connect/README_static_credentials.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

[**Return to main sample list**](../../README.md)

This sample makes an MQTT connection via Websockets and then disconnects. On startup, the device connects to the server via Websockets and then disconnects right after. This sample is for reference on connecting via Websockets. This sample demonstrates the most straightforward way to connect via Websockets by querying the AWS credentials for the connection from the device's environment variables or local files.

This sample makes an MQTT connection via Websockets and then disconnects.
On startup, the device connects to the server via Websockets then disconnects right after.
This sample demonstrates connecting via static credentials.
Expand All @@ -13,7 +11,6 @@ then you will need to replace part of the sample (connection\_setup function) wi

* [Websocket Connect/simple_auth](./README.md)
* [Websocket Connect/username and password](./README_username_password.md)
* [Websocket Connect/proxy](./README_proxy.md)
* [Websocket Connect/custom auth](./README_custom_auth.md)

Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerguide/iot-policies.html) must provide privileges for this sample to connect. Below is a sample policy that can be used on your IoT Core Thing that will allow this sample to run as intended.
Expand Down
86 changes: 0 additions & 86 deletions samples/mqtt/websocket_connect/README_username_password.md

This file was deleted.

0 comments on commit 2fea746

Please sign in to comment.