# S3 Telemetry Integration

Integrating your telemetry data into Finout using a S3 bucket of your choosing, requires setting up a consistent export process to an S3 bucket, for which Finout has been granted read access. This ensures that Finout can retrieve and process your data, which should be structured to include a daily timestamp, the telemetry value for each day, and the granularity of the data collected.

#### How it works

Finout ingests telemetry data from an S3 bucket that you manage. The S3 endpoint grants Finout read-only access to specific files in your AWS account. Telemetry files must be exported on a consistent schedule and include a daily timestamp, the telemetry value for each day, and the data’s granularity.

Finout supports two ingestion patterns, depending on how you organize telemetry data in S3:

* **Multiple S3 buckets (multiple endpoints):**\
  Use this option if you want to separate telemetry data across different buckets (for example, by team, environment, or data source). Each S3 bucket is configured as a separate **endpoint** in Finout and requires its own access permissions.
* **Single S3 bucket with multiple files (single endpoint):**\
  Use this option if you prefer to centralize telemetry data in one bucket. Finout reads multiple CSV files from a specified folder path within the bucket. The bucket and folder path together are treated as a single **endpoint**, provided the correct permissions are configured.

**S3 Telemetry Configuration Workflow:**

1. [Generate CSV Export](#h_52fa740f9d)
2. [Prepare CSV Format](#h_df5b422546)
3. [Create a Folder in the Bucket](#h_b1310b2af3)
4. [Obtain External ID from Finout](#h_17fc5d10a0)
5. [Set up an S3 Bucket](#h_17fc5d10a0)
6. [Provide Data to Finout](#h_9e63e58804)

## 1. Generate CSV Export <a href="#h_52fa740f9d" id="h_52fa740f9d"></a>

Generate a daily CSV export by selecting from two approaches for your CSV exports:

1. Maintain a single CSV that receives updates daily with new data entries.
2. Create a new CSV file for each day's telemetry data.

We recommend opting for the second option, which is creating a distinct CSV file for each day's telemetry data.

## 2. Prepare CSV Format <a href="#h_df5b422546" id="h_df5b422546"></a>

When preparing your telemetry data for Finout, ensure your CSV files follow the required format, which includes three main column types: Date, Metadata, and Telemetry.

| **Type of column**      | **How many columns can be used?** | **Mandatory/Optional** | **What is this used for?**                                                                                                                                      | **Format / Notes**                    |
| ----------------------- | --------------------------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| **Date**                | Single                            | Mandatory              | Each data row input represents the telemetry for a specific date, accompanied by their metadata values, indicating the day on which the telemetry was recorded. | <p>YYYY-MM-DD</p><p>“date” column</p> |
| **Metadata (multiple)** | 0-10                              | Optional               | Any tagging attributes can be utilized to group and filter the telemetry data based on metadata such as team, group, or feature.                                | Optional                              |
| **Telemetry**           | 1                                 | Mandatory              | Represent the total of the telemetry for the given date and metadata.                                                                                           | Positive number                       |

{% hint style="danger" %}
**Important**:

1. The CSV must include at least two specific columns: date and \<telemetry\_name>.
2. The Telemetry column name will be used as the unique identifier for this telemetry within Finout.
3. Column headers must not include spaces.
   {% endhint %}

**Example**:

In this example, we will supply the mandatory columns date (“date") and telemetry (“bytes") together with an optional metadata column “teamname”.

"date","teamname","bytes"

"2022-06-07","Servers","12.12"

"2022-06-07","Storage","6.22"

"2022-06-08","Network","0.05"

Date = date

teamname = metadata

Bytes = telemetry

## 3. Create a Folder in the Bucket <a href="#h_b1310b2af3" id="h_b1310b2af3"></a>

Create a separate folder within the bucket for each telemetry integration. This setup allows you to easily reuse permissions for sending other telemetry using the same integration.

{% hint style="warning" %}
**Important - Before you continue:**&#x20;

* If you *don’t have an endpoint* or want to *create additional endpoints*, continue to the next step.
* If you *already have an endpoint and want to add a file* to it, contact Finout Support and provide the new folder's prefix name. Finout will configure the new telemetry using the existing endpoint.
  {% endhint %}

## 4. Obtain External ID from Finout <a href="#h_17fc5d10a0" id="h_17fc5d10a0"></a>

1. Copy your “external-id” from the Finout console, or use a random one, preferably in the format of finout-XXXXXXX.
2. Click on[ create a new cross-account role in IAM](https://console.aws.amazon.com/iam/home?region=us-east-1#/roles%24new?step=type\&roleType=crossAccount) to create a role for another AWS account.
3. Enter the **AWS Account ID** associated with the S3 bucket in the Account ID field.
4. Choose the option to **Require external ID** and input the “external-id” you got from the Finout console.

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FJum5R2O1UYp8eGAn5HiR%2Fimage.png?alt=media&#x26;token=78743a49-d296-46c9-9daf-7e6031e0ee70" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://finout.intercom-attachments.eu/i/o/10971391/5e8a065b883d684de272ae52/1AcsijjBjMWJG57DxBRnxpvVBe2GnkRR8KLt5MCpxhHeQLVahu_jhwSAjP_xa1hbXa7UQBJ3QloQfk8mwWMC94OsiH6montPRWJwZFZULbCF3qeX7zNBAZnPvbTey_En5xVMHvnZV_K2OJZgSgLzPXo?expires=1732631400&#x26;signature=68ecdb650d1e69aa83d560270ca96232646c2bef5e421914822e13e2da8b3bfe&#x26;req=0dVmwln5pTZk2hL085ZhodXbr7%2BuZjNwyontvgdAICKgIX3Mu7Mpvm8e4gAA%0Amg%3D%3D%0A" alt=""><figcaption></figcaption></figure>
5. Click **Next** until you reach the review screen.
6. Configure the review as shown below, with one exception: the role name should be: FinoutMetricsReadOnlyRole (unlike in the screenshot below).

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2Fz6nk3fLCjG5HkFfYQekg%2Fimage.png?alt=media&#x26;token=1d2ba880-f1e1-4b65-a346-220309ff988b" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://finout.intercom-attachments.eu/i/o/10971392/c850da3f69348e51b65d4dd5/NtPzDiJirsmz4he8YAt7S27e3QTD4y57v2F5QpaOMKuIJe948SOrd_HyLcHaDdWnVNvY8TiExiZo8Vi3NHhLU54RB0JP6B4KM3E2QH1yWkdWCs7VsQcJzrAneSc7tpLoGKlKMB3jB0BK9Ys4rlIAm7I?expires=1732631400&#x26;signature=f3098e931f2eaf19045c58542733d6ad6978041bd26bb6ec3cebb99fdbd44449&#x26;req=0dVmwln5pTVk2hL085Zhof6jUWXfndGsTc%2BIKMbKhSbDu04zmBFc%2Ff20aBG3%0A1w%3D%3D%0A" alt=""><figcaption></figcaption></figure>
7. Go to your newly created role.
8. Copy the **Role ARN** and paste it into the Finout console.
9. Click **Add permissions** and select **Create inline policy**.

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FzOo2MjktgbwsCOdV8WSQ%2Fimage.png?alt=media&#x26;token=8233a131-ea71-4d2c-8c68-7de707c0e42f" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://finout.intercom-attachments.eu/i/o/10971394/7dd7e0e3e728364dcb5d1364/nAo08YZGJNACqorwAxNccLXJ-6S1yRzu4NWkMgVV1y8wABI9SYz5ktT1Cwea_bCMlzrosvn514SzyaX2Tt-W72-Ui9qySI5J1axJBzbwevNiu4AGBkBhmSOT0aTR_XCA_UUplWHmgh_CU7NLUncAzK4?expires=1732631400&#x26;signature=e653dd24c53c703b4051f6e1ac91ee2d5047cbc5bdd4337d529b6c570d3fc369&#x26;req=0dVmwln5pTNk2hL085ZhoY6yob3oRXXL2wMMALsN%2Bqs8N1E%2FpIcqA14vr4RX%0A0Q%3D%3D%0A" alt=""><figcaption></figcaption></figure>
10. Select JSON, and insert the following. Replace the \<BUCKET\_NAME> with the name of your newly created bucket or your existing CUR bucket:

    ```json
    "Version": "2012-10-17",
        "Statement": [
            {
                "Effect": "Allow",
                "Action": [
                    "tag:GetTagKeys"
                ],
                "Resource": "*"
            },
            {
                "Effect": "Allow",
                "Action": [
                    "s3:Get*",
                    "s3:List*"
                ],
                "Resource": "arn:aws:s3:::<BUCKET_NAME>/*"
            },
            {
                "Effect": "Allow",
                "Action": [
                    "s3:Get*",
                    "s3:List*"
                ],
                "Resource": "arn:aws:s3:::<BUCKET_NAME>"
            }
        ]
    }
    ```
11. Click Next until you reach the review screen, and name the policy finest-access-policy\_telemetry\_export (or choose your own name).
12. Navigate to **Settings > Endpoints**. \
    The Endpoint page appears.<br>

    <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FcugfnuRrq7CNBi9bR2FG%2Fimage.png?alt=media&#x26;token=1a1ce7ac-0a1a-4402-a168-dd4b69ddd113" alt=""><figcaption></figcaption></figure>
13. Click **Add Endpoint**, then select **Amazon S3**. \
    The **Add Amazon S3 Bucket Endpoint** page appears.\
    ![](https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F3G17ETzq3DlcgdxfQaSp%2Fimage.png?alt=media\&token=e17acbe6-bbef-47c7-991f-2820e0fec671)
14. Bucket Access - Choose one of the following options:
    1. Read Only - If you only want Finout to read the S3 bucket, for example, if you want to add telemetry.
    2. Read and Write (Coming Soon) - If you want Finout to read and write in the S3 bucket. For example, if you are adding an archiver.
15. Copy the External ID.

## 5. Set up an S3 Bucket

{% hint style="warning" %}
**Important**: If you already have an Amazon S3 bucket connected to Finout, you can skip to **Step 3**. If you have not yet set up an S3 bucket, or if you want to connect additional S3 buckets within your organization, continue with this step.
{% endhint %}

1. Click on[ create a new cross-account role in IAM](https://console.aws.amazon.com/iam/home?region=us-east-1#/roles%24new?step=type\&roleType=crossAccount) to create a role for another AWS account.
2. Enter the **AWS Account ID** associated with the S3 bucket in the Account ID field.
3. Choose the option to **Require external ID** and input the “external-id” you got from the Finout console.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FZbpt1TEmHuKkEZNsCIP7%2Fimage.png?alt=media&#x26;token=584a6adb-833a-40fd-9414-d636c3d34c55" alt=""><figcaption></figcaption></figure>
4. Click **Next** until you reach the review screen.
5. Configure the review as shown below, with one exception: the role name should be: FinoutMetricsReadOnlyRole (unlike in the screenshot below).<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2F7xNxtADOYp9QwjWn1YHP%2Fimage.png?alt=media&#x26;token=0f1067a1-93c0-4623-86c5-45bbc05079c4" alt=""><figcaption></figcaption></figure>
6. Go to your newly created role.
7. Copy the **Role ARN** and paste it into the Finout console.
8. Click **Add permissions** and select **Create inline policy**.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FBFXrG2DklVAfje4jSWmE%2Fimage.png?alt=media&#x26;token=c6202fff-69e1-4442-9719-a4533e6121d0" alt=""><figcaption></figcaption></figure>
9. Select JSON, and insert the following. Replace the \<BUCKET\_NAME> with the name of your newly created bucket or your existing bucket:<br>

   ```json
   "Version": "2012-10-17",
       "Statement": [
           {
               "Effect": "Allow",
               "Action": [
                   "tag:GetTagKeys"
               ],
               "Resource": "*"
           },
           {
               "Effect": "Allow",
               "Action": [
                   "s3:Get*",
                   "s3:List*"
               ],
               "Resource": "arn:aws:s3:::<BUCKET_NAME>/*"
           },
           {
               "Effect": "Allow",
               "Action": [
                   "s3:Get*",
                   "s3:List*"
               ],
               "Resource": "arn:aws:s3:::<BUCKET_NAME>"
           }
       ]
   }
   ```
10. Click Next until you reach the review screen, and name the policy finest-access-policy\_telemetry\_export (or choose your own name).

## 6. Add Bucket Details to Finout

1. Endpoint Name and Description.
2. Add the following fields:
   1. Add the **Role ARN.** The Amazon Resource Name (ARN) specifies the role.
   2. Add the **Bucket Name**. This is the name under which AWS stores your cost and usage reports.
   3. Add the **S3 Path Prefix** (Optional). This is the folder in S3 in which the files are located.
   4. Add the **Region**.
3. Click **Test Endpoint** to create a test.
4. Click **Add Endpoint**.
5. Contact Finout Support and inform them that the endpoint was created.\
   **Result**:\
   The Amazon S3 Bucket endpoint is created and appears in the endpoints list.<br>

   <figure><img src="https://3858159242-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWqjB2puKXPDR7L86FX2e%2Fuploads%2FNzxORou1KxPUbw8DTXdN%2Fimage.png?alt=media&#x26;token=5b04e2bc-9a30-4f97-8aad-7994baf13aed" alt=""><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.finout.io/telemetry-integrations/telemetry/s3-telemetry-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
