Step 1: Create the AWS IoT policy
Create an AWS IoT policy that allows your Raspberry Pi to connect and send messages to AWS IoT.
-
In the AWS IoT console
, if a Get started button appears, choose it. Otherwise, in the navigation pane, expand Security, and then choose Policies. -
If a You don't have any policies yet dialog box appears, choose Create a policy. Otherwise, choose Create.
-
Enter a name for the AWS IoT policy (for example,
MoistureSensorPolicy
). -
In the Add statements section, replace the existing policy with the following JSON. Replace
region
andaccount
with your AWS Region and AWS account number. -
Choose Create.