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

# AWS

> Connect an AWS account for your cloud bill and Bedrock usage with a read-only cross-account role.

> [!NOTE]
>
> Admin only. Open **Connect › Sources**, then the **Cloud** tab.

TensorCost reads AWS through one read-only IAM role in your account. It stores no access keys: TensorCost assumes the role, and the role only trusts TensorCost's AWS account when the request carries an External ID that the console generated for you.

## What you do

**1. Turn on Bedrock model invocation logging**

In the Bedrock console, send invocation logs to a CloudWatch log group and note its ARN. The stack needs this ARN, even if Bedrock is not your main interest, because the bill import is attached to this connection (see below).

**2. Launch the stack**

In the console, open the AWS card and choose **Launch CFN Stack**. The console mints the External ID and opens the AWS CloudFormation quick-create page for a stack named `tensorcost-onboarding`, with the template, External ID and TensorCost account id filled in. Enter the Bedrock log group ARN.

**3. Optional: add your Cost and Usage Report**

Tick **Enable CUR access** and enter the S3 bucket and prefix your CUR writes to. For an organisation, deploy in the management account and use the payer's CUR bucket.

**4. Connect**

Either let the stack post the role ARN back (the optional checkbox adds a small Lambda), or copy the `BedrockReaderRoleArn` output and choose **I deployed, connect**. The console tries to assume the role first. If that fails it offers **Connect anyway**.

## What the role can do

| Permission | Used for |
| - | - |
| `cloudwatch:GetMetricData`, `cloudwatch:ListMetrics` | Bedrock metrics |
| `logs:FilterLogEvents`, `DescribeLogStreams`, `GetLogEvents` on the log group; `logs:DescribeLogGroups` | Bedrock invocation logs |
| `s3:GetObject`, `GetObjectAcl`, `ListBucket`, `GetBucketLocation` on the CUR bucket; `cur:DescribeReportDefinitions` | Cost and Usage Report (only with CUR enabled) |

In organisation mode the role also gets read-only `organizations:List*` and `Describe*`. It assumes no role in your member accounts.

## How the bill gets in

The AWS cost import for an account runs through that account's Bedrock connection. That is why the console asks for the log group even when you turn on CUR, and why it stops you if you leave it blank. If the Bedrock part fails to save, the console tells you the account is connected but spend won't import yet; fix the log group and save again.

If you have no Bedrock usage and just want to see a bill, upload a CUR instead with [Upload data](https://docs.tensorcost.com/connect/upload-data.md).

## What appears and when

| Data | Cadence |
| - | - |
| Bedrock calls from the log group | Every 15 minutes |
| CUR cost lines | Daily around 06:00 to 06:30 UTC |

AWS delivers CUR files with up to a day of delay, so the first cloud spend usually lands in 24 to 48 hours. You can choose a cost multiplier on the Bedrock setup (for example 0.95 for a negotiated 5% discount).

## If it doesn't show up

* A log group in a different region from the one you entered, logging turned off, or no Bedrock calls yet all give an empty connection.
* Check **Settings › Connection status** to see whether each account is syncing.
* CUR data covers the account's bill; the connection verifies by assuming the role, not by reading a bill.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.