Code Examples
CYW943907AEVAL1F Evaluation Kit User Guide, Doc. No. 002-18703 Rev. *B
43
5.1.3.3 Create a policy
1. In the AWS IoT Console window, go to
Secure
>
Policies
, and then click the
Create
Figure 5-5. Create a Policy
2. The
Create a policy
window appears. Assign a policy name in the
Name
field (for example, 943907_policy).
3. In
Add statement
, specify the Action as
iot:*
.
4. Assign an Amazon Resource Name (ARN) in the
Resource
ARN
field. To use a wildcard, change the last part of the
Resource ARN as follows:
from
arn:aws:iot:us-east-1:xxxxxxxxxxxx:topic/replaceWithATopic
to
arn:aws:iot:us-east-1:xxxxxxxxxxxx:*
Notes:
▪
Use the region that you selected when you set up your account.
▪
Replace
xxxxxxxxxxxx with the appropriate value for your ARN.
▪
In the ARN name, ensure to change “
topic/replaceWithATopic
” to “*”, where “*” indicates all topics. If you
want to use the certificates only for a specific topic (in our case, “
943907_led_onoff
” is the one defined as
WICED_TOPIC
macro in
publish_subscribe.c
), use the following Resource ARN “
arn:aws:iot:us-east-
1:xxxxxxxxxxxx:943907_led_onoff
”.
5. Select the check box
Allow Effect
as shown in