Amazon Freertos workshop using the M5 StickC
View the Project on GitHub onsankawai/amazon-freertos-m5stickc-workshop
Navigate to IoT Core to enter AWS IoT services
Follow the below 3 steps to register your thing:
If this is the very first time you create a device, the following page will appear, please click “Register a thing” to get started
In Creating AWS IoT Things page, choose “create single thing“
Input a device name of your choice and click “Next”
Choose One-click certificate creation
If this is the first time you create a thing in AWS IoT, you may not have a policy for the thing. you can click “Register Thing” and attach policy later.
So let’s see exactly what was generated.
Note - Do not lose this zip file, it contains your private key file which cannot be retrieved again.
Next step we will create a policy to the certificate we’ve created in the previous step input the policy name and enter advanced mode to past the policies copy the following policy statement into the statements
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iot:Publish",
"iot:Subscribe",
"iot:Connect",
"iot:Receive"
],
"Resource": [
"*"
]
},
{
"Effect": "Allow",
"Action": [
"greengrass:*"
],
"Resource": [
"*"
]
}
]
}
copy the above policy statement and create
After creation, in the IoT Core console, navigate to “Secure → Policies“ your policy should be there
navigate to “Secure → Certificates“
In the certificate page click “Actions → Attach policy”,
Select policy and attach
Now, check the polices of the certificate, and the policy you’ve added should be there