# Setting Up Cost Reports Manually

OneLens prefers the IAM role and CUR bucket to be created in us-east-1 region if you have multiple regions active. However if you wish to setup the Role and CUR bucket in a specific region, this document will guide you with the setup process.&#x20;

Its is a two step process:

1. [Setting up the CUR 2.0 report](#setting-up-the-cur-2.0-report)
2. [Creating IAM role for access](#creating-iam-role-for-access)

## Setting up the CUR 2.0 report

Billing service is a global service, which internally served by AWS in `us-east-1` region. We will configure the export via this global service to deliver reports in the S3 bucket created in choice of your region

{% stepper %}
{% step %}

### Initiate Data export

Go to Billing Service and click on[ Data Export](https://us-east-1.console.aws.amazon.com/costmanagement/home?region=ap-south-1#/bcm-data-exports).&#x20;

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FbrLFg0tiDjzy86npRrpy%2Fimage.png?alt=media&#x26;token=0dcf4793-ebbc-4435-99ba-0ee029e37108" alt=""><figcaption></figcaption></figure>

{% endstep %}

{% step %}

### Create new report

Click on the `Create` button. Provide the Export Name as `OneLens-Standard-CUR-Export` and data export type should be the default, i.e. Standard Data Export.

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2Fv0ojAmefWRxN7WbfCsrl%2Fimage.png?alt=media&#x26;token=eae33002-56b3-44bb-8851-f80fddd93935" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure Table content setting

Select

1. Select report format as `CUR 2.0`
2. In addiotional settings, select both the check boxes
   1. Include Resource Id
   2. Split Cost Allocation Data

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FtCfmre9VsDltDuLDzlkz%2Fimage.png?alt=media&#x26;token=238df03f-c515-4a80-bee8-1ae6c36aa16d" alt=""><figcaption></figcaption></figure>

You should see the selection of 125 Columns
{% endstep %}

{% step %}
Configure Storage Settings and Finalize

Configure the S3 setting as per your need. In below screenshots we you see we selected \`ap-south-1\`as preferred region

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FU9fz8L6JvN8uLmfpwcjM%2Fimage.png?alt=media&#x26;token=fac53dca-1f5f-4b3d-9861-256fcec318a5" alt=""><figcaption></figcaption></figure>

Provide the Bucket Name and the region in which you want the bucket to be created

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2Fj7b4pj9JXSuG5GcW4zMn%2Fimage.png?alt=media&#x26;token=ed0680b9-ec5c-47d6-9621-14af25f3695d" alt=""><figcaption></figcaption></figure>

Provide the CUR Path as `cur` and hit the Create Button

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FHiLl4FuqzixkeA2WG6h5%2Fimage.png?alt=media&#x26;token=aedb2c66-66bb-4e7b-9c7c-ca1ab6f73fc6" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

> Note - AWS will take 24-48 Hours to generate the first report.

## Creating IAM role for access

Once the S3 bucket is configured, lets create the IAM Role in the same region where you created the CUR bucket

{% stepper %}
{% step %}

### Create Cloudformation Stack

Go to CFT Service and upload the Stack. You can find the yml file below

{% file src="<https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FP4oyeM397TI3Uuiq6tQ1%2Fcur-role%20(1).yml?alt=media&token=58253345-9019-4c3f-9e12-971c3cb0f7c9>" %}

{% endstep %}

{% step %}

### Specify Stack Details

Provide the details as

1. Stack Name - `onelens-cur-role-stack`
2. Role Name - get the unique ID from OneLens Team for your Account.
3. S3 Bucket Name - your S3 bucket name created in previous step

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FySk9k2qX7zr36wCt3JIM%2Fimage.png?alt=media&#x26;token=c9508148-6020-4765-bce2-14676fc527ae" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Configure Stack Options

Click on Next and provide Tags as per your company norms (optional)

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FatNtZsV8jJtIz3HiESm7%2Fimage.png?alt=media&#x26;token=7b9ed795-1609-422f-93ad-bb880fc83a4e" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Review and create

Acknowledge that you are creating an IAM Role and create the role

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FiyREWG6seuMvbft30nCk%2Fimage.png?alt=media&#x26;token=b6bacc00-579a-447e-8ec7-1ea457c1b34d" alt=""><figcaption></figcaption></figure>

Click on `Next` and then `Submit`

<figure><img src="https://3963693991-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiyNGpqVYfmDF6qt7Lzar%2Fuploads%2FqNkKNEs4os6uk5eN1k3q%2Fimage.png?alt=media&#x26;token=fd6880ba-3f9c-42e6-b815-b341e3734bd9" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

After successful execution, please share the following details with OneLens team

* Your Account ID in which you have run the Stack
* S3 CUR Bucket Name
