Skip to content

Commit 902f17f

Browse files
authored
Improve README titles and add TOC to samples README (#101)
1 parent 15a25be commit 902f17f

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AWS IoT SDK for Python v2
1+
# AWS IoT Device SDK for Python v2
22
This document provides information about the AWS IoT device SDK for Python V2.
33

44
If you have any issues or feature requests, please file an issue or pull request.

samples/README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
# Samples
1+
# Sample apps for the AWS IoT Device SDK for Python v2
2+
3+
* [pubsub](#pubsub)
4+
* [shadow](#shadow)
5+
* [fleet provisioning](#fleet-provisioning)
6+
* [basic discovery](#basic-discovery)
27

38
## pubsub
49
This sample uses the
@@ -306,7 +311,7 @@ get the sample up and running. These steps assume you have the AWS CLI installe
306311
sufficient permission to perform all of the listed operations. These steps are based on provisioning setup steps
307312
that can be found at [Embedded C SDK Setup](https://docs.aws.amazon.com/freertos/latest/lib-ref/c-sdk/provisioning/provisioning_tests.html#provisioning_system_tests_setup)
308313

309-
First, create the IAM role that will be needed by the fleet provisioning template. Replace `RoleName` with a name of the role you want to create.
314+
First, create the IAM role that will be needed by the fleet provisioning template. Replace `RoleName` with a name of the role you want to create.
310315
<pre>
311316
aws iam create-role \
312317
--role-name [RoleName] \
@@ -318,17 +323,17 @@ aws iam attach-role-policy \
318323
--role-name [RoleName] \
319324
--policy-arn arn:aws:iam::aws:policy/service-role/AWSIoTThingsRegistration
320325
</pre>
321-
Finally, create the template resource which will be used for provisioning by the demo application. This needs to be done only
322-
once. To create a template, the following AWS CLI command may be used. Replace `TemplateName` with the name of the fleet
323-
provisioning template you want to create. Replace `RoleName` with the name of the role you created previously. Replace
324-
`TemplateJSON` with the template body as a JSON string (containing escape characters). Replace `account` with your AWS
325-
account number.
326+
Finally, create the template resource which will be used for provisioning by the demo application. This needs to be done only
327+
once. To create a template, the following AWS CLI command may be used. Replace `TemplateName` with the name of the fleet
328+
provisioning template you want to create. Replace `RoleName` with the name of the role you created previously. Replace
329+
`TemplateJSON` with the template body as a JSON string (containing escape characters). Replace `account` with your AWS
330+
account number.
326331
<pre>
327332
aws iot create-provisioning-template \
328333
--template-name [TemplateName] \
329334
--provisioning-role-arn arn:aws:iam::[account]:service-role/[RoleName] \
330335
--template-body "[TemplateJSON]" \
331-
--enabled
336+
--enabled
332337
</pre>
333338
The rest of the instructions assume you have used the following for the template body:
334339
<pre>
@@ -337,13 +342,13 @@ The rest of the instructions assume you have used the following for the template
337342
If you use a different body, you may need to pass in different template parameters.
338343
##### Running the sample and provisioning using a certificate-key set from a provisioning claim
339344

340-
To run the provisioning sample, you'll need a certificate and key set with sufficient permissions. Provisioning certificates are normally
345+
To run the provisioning sample, you'll need a certificate and key set with sufficient permissions. Provisioning certificates are normally
341346
created ahead of time and placed on your device, but for this sample, we will just create them on the fly. You can also
342347
use any certificate set you've already created if it has sufficient IoT permissions and in doing so, you can skip the step
343348
that calls `create-provisioning-claim`.
344-
349+
345350
We've included a script in the utils folder that creates certificate and key files from the response of calling
346-
`create-provisioning-claim`. These dynamically sourced certificates are only valid for five minutes. When running the command,
351+
`create-provisioning-claim`. These dynamically sourced certificates are only valid for five minutes. When running the command,
347352
you'll need to substitute the name of the template you previously created, and on Windows, replace the paths with something appropriate.
348353

349354
(Optional) Create a temporary provisioning claim certificate set:
@@ -352,7 +357,7 @@ aws iot create-provisioning-claim --template-name [TemplateName] | python ../uti
352357
</pre>
353358

354359
The provisioning claim's cert and key set have been written to `/tmp/provision*`. Now you can use these temporary keys
355-
to perform the actual provisioning. If you are not using the temporary provisioning certificate, replace the paths for `--cert`
360+
to perform the actual provisioning. If you are not using the temporary provisioning certificate, replace the paths for `--cert`
356361
and `--key` appropriately:
357362

358363
<pre>
@@ -384,10 +389,10 @@ aws iot create-provisioning-claim --template-name [TemplateName] | python ../uti
384389
Finally, supply the certificate signing request while invoking the provisioning sample. As with the previous workflow, if
385390
using a permanent certificate set, replace the paths specified in the `--cert` and `--key` arguments:
386391
<pre>
387-
python fleetprovisioning.py --endpoint [your endpoint]-ats.iot.[region].amazonaws.com --root-ca [pathToRootCA] --cert /tmp/provision.cert.pem --key /tmp/provision.private.key --templateName [TemplateName]--templateParameters "{\"SerialNumber\":\"1\",\"DeviceLocation\":\"Seattle\"}" --csr /tmp/deviceCert.csr
392+
python fleetprovisioning.py --endpoint [your endpoint]-ats.iot.[region].amazonaws.com --root-ca [pathToRootCA] --cert /tmp/provision.cert.pem --key /tmp/provision.private.key --templateName [TemplateName]--templateParameters "{\"SerialNumber\":\"1\",\"DeviceLocation\":\"Seattle\"}" --csr /tmp/deviceCert.csr
388393
</pre>
389394

390395
## basic discovery
391396

392397
This sample intended for use directly with the
393-
[Getting Started with AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html) guide.
398+
[Getting Started with AWS IoT Greengrass](https://docs.aws.amazon.com/greengrass/latest/developerguide/gg-gs.html) guide.

0 commit comments

Comments
 (0)