Skip to content

Commit 80640e1

Browse files
Updated README
1 parent 010a787 commit 80640e1

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ First, you'll need to install the AWS CDK if you haven't already. The CDK requir
6262
See the [Getting started with the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html) for
6363
more details.
6464

65-
`npm install -g aws-cdk`
65+
`npm install -g aws-cdk`
6666

6767
Next you'll need to install the dependencies for the CDK deployment.
6868

@@ -76,7 +76,7 @@ https://pipenv.pypa.io/en/latest/install/
7676

7777
Then you can use pipenv to install all the Python dependencies.
7878

79-
`pipenv install`
79+
`pipenv install`
8080

8181
Once all dependencies are installed, you'll need to activate the shell with `pipenv shell`
8282

@@ -91,11 +91,11 @@ to the ``infrastructure`` directory.
9191

9292
1. If this is you're first time using the CDK you'll need to bootstrap your AWS account with the resouces the CDK needs.
9393

94-
`cdk bootstrap`
94+
`cdk bootstrap`
9595

9696
2. Now you're ready to deploy your application.
9797

98-
`cdk deploy`
98+
`cdk deploy`
9999

100100
Note: During deployment, the CDK will ask you to approve of the changes being created by CloudFormation, make sure to
101101
type `y` when prompted.
@@ -132,25 +132,26 @@ A sample Docker environment file has been included if you choose to run the clie
132132

133133
1. Download the AWS IoT CA server certificate from [here](https://www.amazontrust.com/repository/AmazonRootCA1.pem) and
134134
store it in the `client` directory. This will be used by the IoT client to trust the AWS IoT Core Device Gateway.
135-
`wget -O client/AmazonRootCA1.pem https://www.amazontrust.com/repository/AmazonRootCA1.pem`
135+
136+
`wget -O client/AmazonRootCA1.pem https://www.amazontrust.com/repository/AmazonRootCA1.pem`
136137

137138
2. Make sure the correct environment variables mentioned above are configured. The exact commands to do
138139
this might vary slightly between operating systems and runtime environments. But generally in standard Linux/Unix shells
139140
it's accomplished by running `$ export <KEY>=<VALUE>` for each environment variable.
140141

141142
3. With environment variables set, you're ready to start the client. The Python client requires no arguments passed to it.
142143

143-
`python iot_client.py`
144+
`python iot_client.py`
144145

145146
#### Option B - Running in Docker
146147

147148
1. For running with docker, you'll need to build the container locally using the included Dockerfile.
148149

149-
`docker build -t <use any image tag name here> .`
150+
`docker build -t <use any image tag name here> .`
150151

151152
2. Make sure the previously mentioned environment file has the correct values set and then `docker run` with the following command:
152153

153-
`docker run -p 5000:5000 --env-file docker.env -it <image tag>`
154+
`docker run -p 5000:5000 --env-file docker.env -it <image tag>`
154155

155156
## Demo
156157

@@ -178,14 +179,13 @@ The overview of the demo steps are as follows:
178179
2. You will need to make a "GET" request to the registration API to get a token. When this request is made, the API will
179180
generate a token as well as dummy metadata including "tenant", "location", "deviceType", and save it all to a DynamoDB table.
180181
The URL for the request is: <Registration API endpoint from CloudFormation stack>/api/token
181-
`curl <endpoint>/api/token`
182+
`curl <endpoint>/api/token`
182183

183184
3. Copy the token out of the response from the previous request and use it to create a "POST" request to the local IoT client.
184185
Please note the token expires in 5 minutes. The URL for this request is `127.0.0.1:5000/regToken`.
185186
The body should be JSON and the structure is: `{"registrationCode": "<value>"}`
186187

187-
`curl --request POST '127.0.0.1:5000/regToken' --header 'Content-Type: application/json' \
188-
--data-raw '{"registrationCode": <token from previous request>}'`
188+
`curl --request POST '127.0.0.1:5000/regToken' --header 'Content-Type: application/json' --data-raw '{"registrationCode": <token from previous request>}'`
189189

190190
The registration token will then be used by the Registration API to authenticate the device and retrieve a certificate
191191
issued by AWS IoT Core. Once The IoT client has the certificate, and the device has been registered, it will complete

0 commit comments

Comments
 (0)