Skip to content

Commit 4bea39f

Browse files
gergelykarmurutva
authored andcommitted
docs: Update AWS Qualification test descriptions
Signed-off-by: Gergely Korcsák <[email protected]>
1 parent 7892dd8 commit 4bea39f

File tree

1 file changed

+52
-7
lines changed

1 file changed

+52
-7
lines changed

docs/applications/device_advisor/running_aws_iot_core_device_advisor_tests.md

Lines changed: 52 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,25 +6,70 @@ to learn more about the device advisor.
66

77
## Creating an IoT thing
88

9-
Follow the instructions described in the section listed below to create an IoT thing for your device.
9+
Follow the instructions described in the section listed below to create an [IoT thing][creating-an-iot-thing-for-your-device], policy, IAM Policy and IAM role
10+
for your device.
1011

11-
* [IoT thing][creating-an-iot-thing-for-your-device]
12-
13-
## Creating roles and policies
14-
15-
Follow the instructions described in the [page](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor-setting-up.html#da-iam-role) to create a policy for your IoT thing and then a device advisor role.
12+
## Setting up IAM Roles and Policies
1613

1714
* Create an IAM role to use as your device role.
1815
* As part of creating the policy, the topic and topic filter shall be assigned a value `*` and the `clientId` should match the IoT thing name.
1916
* Create a custom-managed policy for an IAM user to use Device Advisor
2017
* Create an IAM user to use Device Advisor (AWS recommendation)
2118

19+
1. Go to the [IAM Dashboard](https://us-east-1.console.aws.amazon.com/iam/home?region=us-west-2#/home).
20+
2. In the left navigation pane under **Access management** select **Policies**, then click on **Create policy**.
21+
* Select the `IoT` service, then click on **Next**.
22+
* Under `IoT` **Actions allowed** select the following: `Connect`, `Publish`, `Subscribe`, `Receive` and
23+
`RetainPublish`.\
24+
Under **Resources**: Ether keep it on `All`, or specify the **client**, **topic** and **topicfilter** with
25+
clicking on **Add ARNs**.
26+
Make sure that you select the same **Resource region** that you specified when creating your **IoT Thing**,
27+
or specify it as `*`. You can set the **Resource client** as your **IoT Thing** name or `*`. In the end you should see:
28+
```text
29+
client: arn:aws:iot:eu-west-1:{account-id}:client/*
30+
topic: arn:aws:iot:eu-west-1:{account-id}:topic/*
31+
topicfilter: arn:aws:iot:eu-west-1:{account-id}:topicfilter/*
32+
```
33+
then click on **Next**.
34+
* Give a **Policy name** in which you can include the **region** you are using, like:
35+
`Proj-device-advisor-eu-west-1-any`, and click on **Create policy**.
36+
3. In the left navigation pane under **Access management** select **Roles**, then click on **Create role**.
37+
* Select `Custom trust policy`, and set the following **Trust policy**:
38+
```json
39+
{
40+
"Version": "2012-10-17",
41+
"Statement": [
42+
{
43+
"Sid": "AllowAwsIoTCoreDeviceAdvisor",
44+
"Effect": "Allow",
45+
"Principal": {
46+
"Service": "iotdeviceadvisor.amazonaws.com"
47+
},
48+
"Action": "sts:AssumeRole"
49+
}
50+
]
51+
}
52+
```
53+
then click on **Next**.
54+
* Under **Permission policies** select the policy that you previously defined, like:
55+
`Proj-device-advisor-eu-west-1-any`.\
56+
Under **Set permission boundary** select `Use a permissions boundary to control the maximum role permissions` if
57+
you have predefined boundary's, then select your project admin boundary.
58+
Then click on **Next**.
59+
* Set the role name, like: `Proj-device-advisor-role-eu-west-1-any`, then click on **Create role**.
60+
61+
For more information follow the instructions described in the
62+
[page](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor-setting-up.html#da-iam-role)
63+
to create a policy for your IoT thing and then a device advisor role.
64+
2265
## Creating AWS IoT Core Qualification test suite
2366
2467
Follow the instructions described the [page](https://docs.aws.amazon.com/iot/latest/developerguide/device-advisor-console-tutorial.html#device-advisor-console-create-suite)
2568
to create AWS IoT Core Qualification test suite.
2669
27-
The `Trigger Topic` property should be set to the value of `deviceAdvisorTOPIC_FORMAT` macro available at [aws_device_advisor_task.h](../../../applications/helpers/device_advisor/inc/aws_device_advisor_task.h) for `TLS Receive Maximum Size Fragments` test.
70+
- The `Trigger Topic` property should be set to the value of `deviceAdvisorTOPIC_FORMAT` macro available at [aws_device_advisor_task.h](../../../applications/helpers/device_advisor/inc/aws_device_advisor_task.h) for `TLS Receive Maximum Size Fragments` test.
71+
- The Device role should be a previously created IAM Role, like: `Proj-device-advisor-role-eu-west-1-any`.
72+
- **Make sure that this role is also set up for the same region, that your test is using, or any!**
2873
2974
## Configuring the application to connect to AWS IoT Core Device Advisor
3075

0 commit comments

Comments
 (0)