# How to analyze data with AWS QuickSight

<div align="left"><figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FJPe2o6LDfOpqkezK15N6%2Fadvanced%20(1).png?alt=media&#x26;token=48a269fa-27bb-4598-a404-94c7073cb568" alt="" width="101"><figcaption></figcaption></figure></div>

## Data Flow Architecture

In this tutorial we'll guide you through the process to set up the architecture below. In order to store data from akenza in an Amazon S3 bucket and use QuickSight for data analysis and report generation.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FPYBcTCbxf5PfSM73D9oI%2FAWS%20QuickSight%20Architecture.png?alt=media&#x26;token=89a7694b-316b-493a-bf99-f3f7486fa850" alt=""><figcaption><p>Target Architecture</p></figcaption></figure>

### Akenza Output connector

Set up a AWS Kinesis output connector as described here: [how-to-send-data-to-aws-kinesis](https://docs.akenza.io/akenza.io/tutorials/create-enterprise-solutions/how-to-send-data-to-aws-kinesis "mention")

### AWS Kinesis Data Stream

Use the Data Stream created in the above mentioned tutorial.

### AWS Data Firehose

#### Prerequisites

If you haven't already created an Amazon S3 data base with a bucket dedicated for this data flow, create one now. Following this chapter: [#general-purpose-bucket](#general-purpose-bucket "mention")

#### Creating a Firehose Stream

Create a new firehose stream. When prompted, select *Amazon Kinesis Data stream* as *Source* and *Amazon S3* as *Destination.* Continue to add a name for your stream.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2F8r1bkFbwkcOJU9bMMvui%2Fscreely-1734006553830.png?alt=media&#x26;token=62648f50-a30a-47f9-a6cc-856bd34a2bee" alt=""><figcaption><p>Creating a firehose stream</p></figcaption></figure>

As a next step browse for the previously created Kinesis data stream in *Source settings*. As well as the prepared S3 bucket in the *Destination settings*. You may also enable the *New line delimiter* option.

Now continue to create firehose stream.

### Amazon S3

#### Create General purpose bucket

In your amazon S3 account create a new *General purpose* bucket. Add a name for your bucket. And consider to enable ACLs to later grant access rights for your QuickSight user to access data in this bucket.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FrvMWn8s5Z3bB7YDoviwb%2Fscreely-1734006962477.png?alt=media&#x26;token=cf61a392-44d1-4c36-8cb9-564b535ad1d7" alt=""><figcaption></figcaption></figure>

### AWS QuickSight

Start by creating an AWS QuickSight account. Ensure to deselect any optional subscription  checkboxes. Grant access for QuickSight to the following services:

* IAM
* Amazon S3
  * select the relevant bucket

{% hint style="info" %}
You may need to add additional permission policies to your aws-quicksight-service-role user to allow access to the S3 bucker. Ensure the following policies have been assigned in IAM:

* [AWSQuickSightIAMPolicy](https://us-east-1.console.aws.amazon.com/iam/home?region=eu-north-1#/policies/details/arn%3Aaws%3Aiam%3A%3A075219014739%3Apolicy%2Fservice-role%2FAWSQuickSightIAMPolicy)
* [AWSQuickSightS3Policy](https://us-east-1.console.aws.amazon.com/iam/home?region=eu-north-1#/policies/details/arn%3Aaws%3Aiam%3A%3A075219014739%3Apolicy%2Fservice-role%2FAWSQuickSightS3Policy)
  {% endhint %}

#### Create Datasets

In Datasets create a *New Dataset*. Select S3 as data source and give it a name. Continue to upload a manifest file. You may use our sample file. Make sure to update the *URIprefixes* to match the files in your S3 bucket.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FrGo2ZppLRK0zhjux7Sxv%2Fscreely-1734007828803.png?alt=media&#x26;token=51732838-c378-4097-8e80-7580ea67c479" alt=""><figcaption><p>Create QuickSight data source</p></figcaption></figure>

```
// Sample manifest file

{
    "fileLocations": [
        {
            "URIPrefixes": [
                "s3://akenza-quicksight-testing/2025/"
            ]
        }w
    ],
    "globalUploadSettings": {
        "format": "JSON"
    }
}
```

#### Create Analysis

In *Analyses* create a *New Analysis* selecting the dataset you just created. Continue with *use in analysis* and create a new sheet. You may then continue to create your analysis and publish the dashboard when completed.

<figure><img src="https://2165942204-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MMKXTFIN5ZlLOjBlfC4%2Fuploads%2FoNpwOMj8fqC3RHgQaveo%2Fscreely-1734008019967.png?alt=media&#x26;token=3bcf1e03-8391-4e3d-a910-4eae83a25b1d" alt=""><figcaption><p>Basic line chart</p></figcaption></figure>
