From aa3be968e284438da3a681a7c8e43be4925cf416 Mon Sep 17 00:00:00 2001 From: Bret Ambrose Date: Wed, 10 Jul 2024 09:25:46 -0700 Subject: [PATCH] Provisioning sample READMEs --- .../node/fleet_provisioning/basic/README.md | 115 ++---------------- samples/node/fleet_provisioning/csr/README.md | 114 ++--------------- samples/node/shadow/README.md | 5 +- 3 files changed, 20 insertions(+), 214 deletions(-) diff --git a/samples/node/fleet_provisioning/basic/README.md b/samples/node/fleet_provisioning/basic/README.md index 1372569f..deed5428 100644 --- a/samples/node/fleet_provisioning/basic/README.md +++ b/samples/node/fleet_provisioning/basic/README.md @@ -2,9 +2,7 @@ [**Return to main sample list**](../../README.md) -This sample uses the AWS IoT [Fleet provisioning](https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html) to provision devices using either a CSR or Keys-And-Certificate and subsequently calls RegisterThing. This allows you to create new AWS IoT Core things using a Fleet Provisioning Template. - -On startup, the script subscribes to topics based on the request type of either CSR or Keys topics, publishes the request to corresponding topic and calls RegisterThing. +This sample uses the AWS IoT [Fleet provisioning service](https://docs.aws.amazon.com/iot/latest/developerguide/provision-wo-cert.html) to provision devices using the CreateKeysAndCertificate and RegisterThing APIs. This allows you to create new AWS IoT Core thing resources using a Fleet Provisioning Template. 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, subscribe, publish, and receive. Below is a sample policy that can be used on your IoT Core Thing that will allow this sample to run as intended. @@ -19,7 +17,6 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg "Action": "iot:Publish", "Resource": [ "arn:aws:iot:region:account:topic/$aws/certificates/create/json", - "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json" ] }, @@ -31,8 +28,6 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg "Resource": [ "arn:aws:iot:region:account:topic/$aws/certificates/create/json/accepted", "arn:aws:iot:region:account:topic/$aws/certificates/create/json/rejected", - "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json/accepted", - "arn:aws:iot:region:account:topic/$aws/certificates/create-from-csr/json/rejected", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json/accepted", "arn:aws:iot:region:account:topic/$aws/provisioning-templates/templatename/provision/json/rejected" ] @@ -45,8 +40,6 @@ Your IoT Core Thing's [Policy](https://docs.aws.amazon.com/iot/latest/developerg "Resource": [ "arn:aws:iot:region:account:topicfilter/$aws/certificates/create/json/accepted", "arn:aws:iot:region:account:topicfilter/$aws/certificates/create/json/rejected", - "arn:aws:iot:region:account:topicfilter/$aws/certificates/create-from-csr/json/accepted", - "arn:aws:iot:region:account:topicfilter/$aws/certificates/create-from-csr/json/rejected", "arn:aws:iot:region:account:topicfilter/$aws/provisioning-templates/templatename/provision/json/accepted", "arn:aws:iot:region:account:topicfilter/$aws/provisioning-templates/templatename/provision/json/rejected" ] @@ -69,7 +62,7 @@ Note that in a real application, you may want to avoid the use of wildcards in y -## How to run +### How to run There are many different ways to run the Fleet Provisioning sample because of how many different ways there are to setup a Fleet Provisioning template in AWS IoT Core. **The easiest and most common way is to run the sample with the following**: @@ -79,23 +72,6 @@ npm install node ./index.js --endpoint --cert --key --template_name