-
Notifications
You must be signed in to change notification settings - Fork 161
Setting up AWS IoT Core endpoint
This guide will help you set up AWS IoT Core to work with the ClusterDuck Protocol. It aims to provide a straightforward process for initializing AWS IoT Core, adding devices, and pushing data to external systems.
- Prerequisites
- Setting Up an AWS Account
- Configuring an AWS IoT Core Instance
- Creating Devices and Obtaining Certificates
- Using ClusterDuck Protocol's Papa Duck Example for AWS IoT Core
- Applying Credentials
- Testing Data Upload to AWS IoT Core
- Setting Up Rules to Push Data to External Systems
- Basic knowledge of AWS and IoT concepts.
- Installed ClusterDuck Protocol on your IoT devices.
-
Visit the AWS Management Console. You can # for a free AWS account here.
-
Click on "# to the Console" if you already have an account or "Create a new AWS account" to set up a new account.
-
Follow the on-screen prompts to complete the account setup.
-
Log in to your AWS account.
-
Navigate to Services and select IoT Core.
-
Click on the IoT Core from the search bar to initialize a new IoT Core instance.
-
In the left menu bar, navigate to Security->Policies.\
-
Click on "Create policy"
-
Set a policy name and add the following 4 Effects
- Iot:Publish
- Iot:Receive
- Iot:Subscribe
- Iot:Connect
-
Add a
*
to all policy resources
-
In the left Menu bar, navigate to Manage -> Things.
-
Click "Create Things" to add a new device.
-
Create a new name for your Papa Duck and click "Next"
-
Click on "Auto-generate a new certificate (recommended)" and click "Next"
-
Attach your policy to your Thing and click on "Create thing"
-
During this process, you will also be prompted to download the required certificates; make sure to keep them in a safe place.
-
Clone or download the ClusterDuck Protocol repository from GitHub.
-
Open the Papa Duck Example for AWS IoT Core in Arduino IDE.
-
Open MQTT Test Client inside your AWS IoT Core dashboard. Click on "Connection details" to retrieve your endpoint.
-
Make sure to put your endpoint in the
PapaDuck.h
file in the designated spot insidechar server[] = ORG "YOUR ENDPOINT";
-
Give your PapaDuck a unique ID of 8 characters
-
In Arduino, navigate to the
secrets.h
tab and enter your endpoint and the ThingID. -
Open the ROOT CA 1, Public Key, and Private key in a code editor and copy and paste the contents in the designated spot in
secrets.h
- Root CA 1 = Amazon Root CA 1
- Public Certificate = Device Certificate (Top one)
- Private Key = Private Key File
-
In the AWS IoT Core dashboard, go to "Act" > "Rules".
-
Click "Create" to set up a new rule.
-
Configure the rule to forward incoming data from your IoT device to an external system of your choice.
-
Save the rule and test to confirm that data is being forwarded appropriately.
Congratulations, you've successfully set up AWS IoT Core to work with your ClusterDuck Protocol devices! For further assistance or more advanced configurations, you may refer to the official AWS IoT Core documentation.
ClusterDuck Protocol 2020-2024 https://www.clusterduckprotocol.org