> ## Documentation Index
> Fetch the complete documentation index at: https://www.propeldata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Amazon Data Firehose setup guide

> Ingesting data from Amazon Data Firehose streams to Propel

<div />

This guide covers how to:

1. [Create a Amazon Data Firehose Data Pool](#step-1-create-a-amazon-data-firehose-data-pool)
2. [Create the Data Firehose stream](#step-2-create-the-data-firehose-stream)
3. [Send test data](#step-3-send-test-data)
4. [Preview data in Propel](#step-4-preview-data-in-propel)

***

## Requirements

* You have a [Propel account](https://console.propeldata.com/get-started).
* You have an AWS account.

***

## Step 1: Create a Amazon Data Firehose Data Pool

First, create a Amazon Data Firehose Data Pool in Propel.

This will give you a dedicated HTTP endpoint for Amazon Data Firehose to send data to.

<Tabs>
  <Tab title="Console">
    <Steps>
      <Step title="Navigate to Data Pools">
        In the Console, click on **"Data Pools"** in the left-hand menu. Click on **"Create Data Pool"** and select **"Amazon Data Firehose"**.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-01.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=ccada23d98165d66faf648daaab3c000" alt="Creating a new Amazon Data Firehose Data Pool in the Propel Console" width="1290" height="577" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-01.png" />
        </Frame>
      </Step>

      <Step title="Define the schema">
        Propel will automatically unpack the Amazon Data Firehose events into individual rows.

        This means that there is **NO** need to unpack the standard `requestId`, `timestamp`, and `records` fields.

        The default schema contains two columns:

        | Column                | Type      | Description                                        |
        | --------------------- | --------- | -------------------------------------------------- |
        | `_propel_received_at` | TIMESTAMP | The timestamp when the event was collected in UTC. |
        | `_propel_payload`     | JSON      | The value in the `records[i].data` of the event.   |

        By providing a sample event, you can add columns to the Data Pool to match the structure of your data.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-02.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=18ef073000e9df981c26ae45b37a5a04" alt="Defining the schema for an Amazon Data Firehose Data Pool" width="1830" height="967" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-02.png" />
        </Frame>

        For this guide, we'll use the TacoSoft sample event:

        ```json theme={"system"}
        {
          "TICKER_SYMBOL": "QXZ",
          "SECTOR": "HEALTHCARE",
          "CHANGE": -0.05,
          "PRICE": 84.51
        }
        ```

        After adding the sample JSON, click on:

        * **Extract top-level properties** to create columns representing the top-level keys.
        * **Extract nested properties** to create columns representing the nested JSON keys.

        <Warning>
          If a required field is missing from the sample event, Propel will reject the event with an `HTTP 400 Bad Request` error.
        </Warning>
      </Step>

      <Step title="Configure Authentication">
        You'll need to enable basic authentication with a user and a secure password.

        <Note>
          You will need the user and password to configure the Amazon Data Firehose.
        </Note>

        After configuring, click **"Next"** to proceed.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-03.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=deef63918f23a0406d8c374679f90984" alt="Configuring authentication settings for an Amazon Data Firehose Data Pool" width="1830" height="424" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-03.png" />
        </Frame>
      </Step>

      <Step title="Configure the table settings">
        Select whether your data is "Append-only" or "Mutable data".

        To learn more, read out guide on [Selecting table engine and sorting key](/docs/guides/table-engine-and-sorting-key).

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-04.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=150325b4cc4ac6a8c9befdda9d90f16e" alt="Selecting table settings for an Amazon Data Firehose Data Pool" width="1830" height="554" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-04.png" />
        </Frame>

        Answer the questions in the wizard to complete the setup.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-05.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=f74b31e0e8791d6ab3363d262175b025" alt="Completing the table settings wizard for an Amazon Data Firehose Data Pool" width="1830" height="554" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-05.png" />
        </Frame>

        Confirm your table settings and click **"Continue"**.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-06.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=4d9fda5f0cf457d89c6c4f263e6e4109" alt="Confirming table settings for an Amazon Data Firehose Data Pool" width="1830" height="795" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-06.png" />
        </Frame>
      </Step>

      <Step title="Set a name and description">
        Enter a name and description for your new Data Pool and click **"Next"**.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/Dnye5EmtO6L5-zx0/images/docs/2024-11-amazon-data-firehose-data-pool-07.png?fit=max&auto=format&n=Dnye5EmtO6L5-zx0&q=85&s=3b896d1bca479d493914119b65e25064" alt="Setting name and description for an Amazon Data Firehose Data Pool" width="1830" height="560" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-07.png" />
        </Frame>

        After creating the Data Pool, you'll be provided with a unique HTTP endpoint and a `X-Amz-Firehose-Access-Key` key.

        You'll need this endpoint and key to configure your Amazon Data Firehose HTTP endpoint destination.

        <Frame>
          <img src="https://mintcdn.com/propeldocs/EJuEs6SO8KXtRuWH/images/docs/2024-11-amazon-data-firehose-data-pool-08.png?fit=max&auto=format&n=EJuEs6SO8KXtRuWH&q=85&s=c0ca64c0bfb6f3aa77c6dacf21a93ccc" alt="Viewing the created Amazon Data Firehose Data Pool details" width="1830" height="1051" data-path="images/docs/2024-11-amazon-data-firehose-data-pool-08.png" />
        </Frame>
      </Step>
    </Steps>
  </Tab>

  <Tab title="API">
    For the Amazon Data Firehose Data Pool, creating the Data Source below automatically creates the Data Pool.

    ```graphql theme={"system"}
    mutation {
      createAmazonDataFirehoseDataSource(input: {
        uniqueName: "my_amazon_data_firehose_data_pool"
        description:"My Amazon Data Firehose Data Pool"
        connectionSettings: {
          basicAuth: {
            username: "<YOUR_USERNAME>"
            password: "<YOUR_PASSWORD>"
          }
          columns: [
            { name: "ticker_symbol", jsonProperty: "TICKER_SYMBOL", type: STRING, nullable: false },
            { name: "sector", jsonProperty: "SECTOR", type: STRING, nullable: false },
            { name: "change", jsonProperty: "CHANGE", type: FLOAT64, nullable: false },
            { name: "price", jsonProperty: "PRICE", type: FLOAT64, nullable: false }
          ]
          accessControlEnabled: true,
          tableSettings: {
            engine: {
              mergeTree: {
                type: MERGE_TREE
              }
            }
            orderBy: ["_propel_received_at"],
          }
        }

      }){
        dataSource {
          id
          uniqueName
          status
          type
          connectionSettings {
            ... on AmazonDataFirehoseConnectionSettings {
              httpEndpointURL
              xAmzFirehoseAccessKey
            }
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

***

## Step 2: Create the Data Firehose stream

Once you have the Data Pool created, we'll need to create an Amazon Data Firehose stream with an HTTP endpoint destination that sends events to Propel.

<Steps>
  <Step title="Go to the 'Amazon Data Firehose' section of the AWS console">
    Once you are in the **"Amazon Data Firehose"** section of the AWS console, click on **"Create Firehose stream"**.

    <Frame>
      <img src="https://mintcdn.com/propeldocs/EJuEs6SO8KXtRuWH/images/docs/amazon-firehose-setup-01.png?fit=max&auto=format&n=EJuEs6SO8KXtRuWH&q=85&s=712b368c976ef2187ef21cb98d9f1ded" alt="Creating a new Firehose stream in AWS console" width="926" height="373" data-path="images/docs/amazon-firehose-setup-01.png" />
    </Frame>
  </Step>

  <Step title="Select a source and destination">
    Select your source and **"HTTP Endpoint"** as the destination.

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-02.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=6cacfd51d785e882954574750cd55d42" alt="Selecting HTTP Endpoint as the destination for Firehose stream" width="1304" height="257" data-path="images/docs/amazon-firehose-setup-02.png" />
    </Frame>
  </Step>

  <Step title="Give your stream a name">
    Give your stream a name for future reference.

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-03.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=d01a5afcebbb6bf292aaa3c132a49e6e" alt="Naming the Firehose stream" width="1295" height="170" data-path="images/docs/amazon-firehose-setup-03.png" />
    </Frame>
  </Step>

  <Step title="Configure the destination">
    Next, we are going to configure the destination. This is where we'll need the information about the Amazon Data Firehose Data Pool we created in the step above.

    1. Get the Propel Amazon Data Firehose Data Pool HTTP endpoint and `X-Amz-Firehose-Access-Key` key.

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-04.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=6b2364a646bcffde5b2dd8e92887d52f" alt="Copying the Data Pool HTTP endpoint and access key" width="1567" height="621" data-path="images/docs/amazon-firehose-setup-04.png" />
    </Frame>

    3. Enter the destination details

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-05.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=5967b95e878c0581883f85e063ab6c32" alt="Configuring the HTTP endpoint destination settings" width="1628" height="1245" data-path="images/docs/amazon-firehose-setup-05.png" />
    </Frame>

    1. **"HTTP endpoint name"** - Give the endpoint a name. For example: "firehose-to-propel"

    2. **"HTTP endpoint URL"** - Enter the Amazon Data Firehose Data Pool HTTP endpoint. It should look like: `https://webhooks.us-east-2.propeldata.com/v1/WHKXXXXXX/kinesis`.

    3. **"Access key"** - Copy the access key you copied above. For example, `Basic Zml6ejpidXp6`.

    4. **"Retry duration"** - Set as the maximum seconds: "7200".

    5. **"Content encoding"** - Set as **"Not enabled"**

    6. **"Buffer hints"** - Set Buffer size to **1MiB**.

    <Info>
      Requests above 1MiB will get a `413 Request Entity Too Large` error.
    </Info>

    7. **"Buffer hints"** - Set Buffer interval to desired value. Recommended to set to **60 seconds**.

    8. Create an S3 bucket for failed deliveries

       If deliveries fail, you don't want to lose events. You must capture failed events in an S3 bucket (required to create the stream).

       To configure it, go to "**Backup settings**" and configure a bucket.

           <Frame>
             <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-06.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=cce90e06247ed86bc3acd73655e93a38" alt="Configuring backup settings for failed deliveries" width="1630" height="475" data-path="images/docs/amazon-firehose-setup-06.png" />
           </Frame>
  </Step>

  <Step title="Create it!">
    Click **"Create Firehose stream"** and you are done!

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-07.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=c4065e8a87c33f8bac11895e1dcd970a" alt="Completing the Firehose stream creation" width="1631" height="147" data-path="images/docs/amazon-firehose-setup-07.png" />
    </Frame>
  </Step>

  <Step title="Monitor for delivery failures">
    If everything is set up correctly, you should not see any deliveries to the logs.

    <Frame>
      <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-08.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=174bc631e32494084f4b9b07f73f0d7b" alt="Monitoring the Firehose stream for delivery failures" width="1643" height="811" data-path="images/docs/amazon-firehose-setup-08.png" />
    </Frame>
  </Step>
</Steps>

***

For further reference, see the [Understand HTTP endpoint delivery request and response specifications](https://docs.aws.amazon.com/firehose/latest/dev/httpdeliveryrequestresponse.html) documentation.

## Step 3: Send test data

Once you have the Data Firehose stream created, you can send test data to it.

<Frame>
  <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-09.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=b6cfe1574b78a7e5d97e673b7c32b144" alt="Sending test data to the Firehose stream" width="1643" height="835" data-path="images/docs/amazon-firehose-setup-09.png" />
</Frame>

## Step 4: Preview data in Propel

Once events are in your Amazon Data Firehose stream, they are ingested directly to Propel.

By going to your Data Pool and clicking **"Preview Data"**, you'll be able to see the records as they land.

<Frame>
  <img src="https://mintcdn.com/propeldocs/QOy5SmMMP2AzzqCU/images/docs/amazon-firehose-setup-10.png?fit=max&auto=format&n=QOy5SmMMP2AzzqCU&q=85&s=44fa07fed528fceaccfc56fa9b9340df" alt="Previewing ingested data in the Propel Console" width="1570" height="1098" data-path="images/docs/amazon-firehose-setup-10.png" />
</Frame>
