---
description: >-
  Connect an AWS billing account to explore your cloud expenses and view
  financial optimization opportunities.
---

# Connect AWS Billing Account

{% hint style="warning" %}
You willI need permissions within your organization to set up IAM access to your billing data. Contact your security team for assistance.
{% endhint %}

To connect an AWS billing account to Sedai, navigate to **Integrations** and click **Add Integration** then select **Billing Account**.

{% hint style="info" %}
Since you can add multiple AWS billing accounts to Sedai, you will be asked to give your integration a unique nickname — this helps you easily identify it within Sedai.
{% endhint %}

The billing integration requires the following access:

* **Cost and Usage Reports (CUR)**: Used to provide spending insights and optimization opportunities (requires access to an S3 bucket to pull data from).
* **Billing API:** Used to create purchasing commitment recommendations based on savings plan usage.

If you do not yet have an existing S3 bucket with CUR data, we recommend using our [CloudFormation](#integrate-via-cloudformation) stack to automatically set up the integration, which will perform the following:&#x20;

* Create a new Identity and Access Management (IAM) Role and attach Sedai's [billing policy](https://raw.githubusercontent.com/SedaiEngineering/sedai-onboarding/main/aws/sedai-billing-account-s3-and-api.json) (once the stack executes, navigate to the **Outputs** tab to copy the Role ARN)
* Create a new S3 bucket to pull CUR data (note: you will need to additionally set up CUR data to point to this bucket)

If you do have en existing S3 bucket with CUR data, we recommend manually configuring the IAM Role and integrating your S3 bucket.

#### Manual Setup

{% hint style="info" %}
If you have an existing S3 bucket with CUR data, Sedai currently supports monthly data. Contact our team if you want to use a bucket with hourly or daily data.
{% endhint %}

1. From your AWS Console, go to **IAM** > **Access** **Management** > **Roles**
2. Under Access Management in the left-hand panel, click **Roles**
3. Select **Create Role**
4. Select **AWS Account** as the Trusted Entity
5. Enter Sedai’s AWS Account ID: **504216784688**&#x20;
6. Attach [<mark style="color:blue;">Sedai's Billing Policy</mark>](https://raw.githubusercontent.com/SedaiEngineering/sedai-onboarding/main/aws/sedai-billing-account-s3-and-api.json)
7. Create the role
8. Copy the Role ARN and paste into Sedai

If you have an existing S3 bucket, provide the following details to integrate to Sedai:

<table><thead><tr><th width="212">Required</th><th>Description</th></tr></thead><tbody><tr><td><strong>Bucket Name</strong></td><td>This can be found in your AWS Console by searching for and selecting <strong>S3</strong> in the top search bar. This will take you to a list of S3 buckets where you can locate your bucket name.  </td></tr><tr><td><strong>Region</strong></td><td>This will be located near your bucket name in your AWS Console. </td></tr><tr><td><strong>Report Path Prefix</strong></td><td>This is the Report Path Prefix used within your own application or data management process.</td></tr></tbody></table>

Cost analysis and savings opportunities will populate in the Cost pages once the necessary data has been gathered (this may take awhile).
