This guide provides instructions on how to connect the NM180100 to the AWS IoT Core.
- A LoRaWAN end-node such as the NM180100EVB.
- A LoRaWAN gateway with support for Basic Station.
- An AWS account.
IAM Policy and Role Creation for CUPS (expand for detailed instructions)
This section outlines the steps to allow the Configuration and Update Server (CUPS) to handle wireless gateway credentials. This procedure only needs to be done once and must be performed before a LoRaWAN gateway can be added to the AWS IoT Core.
-
Login to AWS and type IAM in the search bar at the top.
-
In the IAM console, select Policies in the left panel.
-
In the search box next to Filter policies, enter
AWSIotWirelessGatewayCertManager
. -
If the search result is empty, click on Create policy and continue with the next step. Otherwise skip to Setup Role
-
Select the JSON tab and replace the content with the following:
{ "Version": "2012-10-17", "Statement": [ { "Sid": "IoTWirelessGatewayCertManager", "Effect": "Allow", "Action": [ "iot:CreateKeysAndCertificate", "iot:DescribeCertificate", "iot:ListCertificates", "iot:RegisterCertificate" ], "Resource": "*" } ] }
-
Click on Next: Tags and then Next: Review.
-
On the Review policy page and in text box next to Name, enter
AWSIotWirelessGatewayCertManager
. -
Click Create policy and a confirmation message pops up showing that the policy has been created.
- Back in the IAM console, select Roles in the left panel.
- Click on Create role at the top right corner.
- On the Create role page, choose AWS account.
- Select This account (xxxxxxxxxxxx).
- Select Next.
- In the search box next to Filter policies, enter
AWSIotWirelessGatewayCertManager
. - Select the policy by clicking on the checkbox. Click Next.
- In the textbox beside Role name, enter
IotWirelessGatewayCertManagerRole
. Note that this must have a different name than the policy name. - Select Create role and a confirmation message will show indicating that the role has been created.
- Back in the IAM console, select Roles again.
- Enter
IotWirelessGatewayCertManagerRole
in the search box or the name that you have choosen in the previous section. - Select the Trust relationships tab, and click on Edit trust policy.
- Replace the content with the following:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "iotwireless.amazonaws.com"
},
"Action": "sts:AssumeRole"
}
]
}
- Click Update Policy to save your changes and exit.
IAM Role and Policy for LoRaWAN Messages (expand for detailed instructions)
This section outlines the steps needed to create the role and policy needed to publish messages to AWS IoT.
-
In the IAM console, select Policies in the left menu bar.
-
Click on Create policy.
-
Select the JSON tab and replace the existing content with the following:
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "iot:DescribeEndpoint", "iot:Publish" ], "Resource": "*" } ] }
-
Click on Next: Tags and then Next: Review.
-
On the Review policy page and in text box next to Name, enter a name of your choice. In this example, we will use
demo_destination_policy
. -
Select Create policy and a confirmation message pops up showing that the policy has been created.
- Back in the IAM console, select Roles in the left menu bar.
- Click on Create role at the top right corner.
- On the Create role page, choose AWS account.
- Select This account (xxxxxxxxxxxx).
- Select Next.
- In the search box next to Filter policies, enter
demo_destination_policy
or the name that you have choosen during the policy creation step. - Select the policy by clicking on the checkbox. Select Next: Tags and then Next: Review.
- In the textbox beside Role name, enter a name of your choice. In this example, we will use
demo_destination_role
. - Select Create role and a confirmation message will show indicating that the role has been created.
- Back in the IAM console, select Roles again.
- Enter
demo_destination_role
in the search box or the name that you have choosen in the previous section. - Choose demo_destination_role in the result to edit the role.
- Select the Trust relationships tab, and click on Edit trust policy.
- Replace the content with the following:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"Service": "iotwireless.amazonaws.com"
},
"Action": "sts:AssumeRole",
"Condition": {}
}
]
}
- Click Update Policy to save your changes and exit.