# AWS IoT Core LoRaWAN

### Overview

The Qubitro and AWS IoT Core for LoRaWAN integration allows automatic synchronization of devices and their data from AWS IoT Core to Qubitro without writing any code.

After setup, devices sending data via AWS IoT Core for LoRaWAN will automatically appear within your Qubitro project. Payload decoding and transformations can be easily managed with Qubitro’s built-in no-code functions.

### Prerequisites

* [x] Administrative access to both AWS IoT Core and Qubitro accounts.
* [x] A Qubitro account with an existing project.
* [x] An AWS account with LoRaWAN devices already sending data.

### How It Works

Devices publishing data to AWS IoT Core for LoRaWAN are automatically created in Qubitro. You will configure decoder functions directly in Qubitro to parse incoming payloads.

{% @mermaid/diagram content="graph LR;
A\[Device Publishes Data to AWS] --> B{Device Exists in Qubitro?};

B -- No --> C\[Qubitro Creates Device with DevEUI];
B -- Yes --> D\[Use Existing Device];

C --> E{Decoder Configured in AWS?};
D --> E;

E -- Yes --> F\[Store Incoming JSON in Qubitro];
E -- No --> G\[Apply Decoder Function] --> F;

%% Style Adjustments
style A fill:#d9d9d9,stroke:#000,color:#000;
style B fill:#f2f2f2,stroke:#000,color:#000;
style E fill:#e0e0e0,stroke:#000,color:#000;" %}

### Configuring the Integration

{% stepper %}
{% step %}
**Create an Integration in Qubitro**

1. Log in to the **Qubitro Portal**.
2. Select a project from the list.
3. Click **New Source**.
4. Select **AWS IoT Core for LoRaWAN** from the available sources.

You will see:

* **HTTPS ENDPOINT URL**
* **CONFIRMATION URL**
* **HEADER VALUES** (`projectId` and `webhookSigningKey`)

Keep this page open for the next step.
{% endstep %}

{% step %}
**Configure AWS IoT Core for LoRaWAN**

1. Log in to your **AWS IoT Core Console**.
2. Navigate to **Destinations** under LoRaWAN.
3. Click **Add destination**.
4. Copy and paste the following from Qubitro:

| AWS Field              | Qubitro Provided Value                                          |
| ---------------------- | --------------------------------------------------------------- |
| **HTTPS Endpoint URL** | *(copied from Qubitro Portal)*                                  |
| **Confirmation URL**   | *(copied from Qubitro Portal)*                                  |
| **Headers**            | `projectId`, `webhookSigningKey` *(copied from Qubitro Portal)* |

5. After setting up, AWS will send a **one-time confirmation email**.

{% hint style="warning" %}
Check your email and copy the provided **confirmation token**. Paste this token into the confirmation field on AWS IoT Core to activate your destination.
{% endhint %}

<figure><img src="https://3109056034-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FfQfo4zX1x0hfOimS9E2u%2Fuploads%2FRl3PwbsWu1Zudv9uC0NF%2Fimage.png?alt=media&#x26;token=57639483-a389-4f77-b494-a20881415df4" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Verify Integration**

1. Return to the **Qubitro Portal**.
2. Click **Go to project** and then **Refresh**.
3. Confirm that AWS-connected devices appear.
   {% endstep %}

{% step %}
**Set Up Decoder Function**

1. Within your Qubitro project, navigate to **Functions**.
2. Create a new **Decoder Function**.
3. Choose from pre-built templates or customize your decoder.
4. Save your decoder function to decode incoming payloads automatically.
   {% endstep %}
   {% endstepper %}

### FAQs

<details>

<summary>Do I need manual forwarding setup like MQTT or HTTP?</summary>

No. The integration is automatic using AWS IoT Core’s webhook.

</details>

<details>

<summary>Can multiple AWS IoT Core integrations connect to different Qubitro projects?</summary>

Yes. Create separate integrations for different projects.

</details>

<details>

<summary>Are additional fees associated with the integration?</summary>

No. There are no extra or hidden fees for using the Qubitro <> AWS IoT Core integration.

</details>
