Cloud

AWS

Amazon Web Services — the world's most comprehensive cloud platform, covering compute, storage, AI/ML, and hundreds of other services.

What gets synced

Roiva writes these metric observations on each sync. Reference the key in a value formula to use this data in your ROI calculations.

Billing

aws.cost.total_spend Total Spend currency
aws.cost.service_spend Per-service spend (one row per service, the service in the row's dimensions) currency
Common use cases
  • Track daily AWS spend broken down by service (SageMaker, Bedrock, Lambda, EC2, and more)
  • Monitor total AI infrastructure cost across your AWS account over time
  • Scope costs to a specific initiative using AWS Cost Allocation Tags
  • Use monthly spend observations in value formulas to calculate net ROI
How to connect
  1. In AWS: Open CloudShell (the terminal icon in the console's top bar), signed in to the account whose bill Roiva should read, and run the setup script below. In an AWS Organization, use the management account: it sees every member account's costs, and only it can activate cost allocation tags. The script creates an IAM user that can read Cost Explorer and nothing else, and prints its access key as access_key_id:secret_access_key
  2. In AWS: If nobody has opened Cost Explorer in this account before, open it once under Billing and Cost Management to turn it on. AWS then takes about 24 hours to prepare the data
  3. Back in Roiva: Paste the line the script printed into API Key / Secret and save the connection
  4. Back in Roiva: The connection page checks each step as that user and gives the command for anything still missing. Once it's all ticked, click Test Connection
  5. Back in Roiva: To count one initiative's costs, tag its resources (Initiative=InvoiceAI, say), activate the tag key under Cost allocation tags in Billing and Cost Management, and enter the tag key and value as Filters on the initiative's link. The connection page checks each tagged link too
Setup script
# Run in AWS CloudShell, signed in to the account whose bill Roiva should
# read. In an AWS Organization, that's the management account.

# A user for Roiva that can read Cost Explorer and nothing else.
aws iam create-user --user-name roiva-cost-reader > /dev/null
aws iam put-user-policy --user-name roiva-cost-reader --policy-name roiva-cost-explorer-read \
  --policy-document '{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["ce:GetCostAndUsage","ce:ListCostAllocationTags"],"Resource":"*"}]}'

# Its access key. The line this prints goes in API Key / Secret:
# access_key_id:secret_access_key.
aws iam create-access-key --user-name roiva-cost-reader \
  --query "join(':', [AccessKey.AccessKeyId, AccessKey.SecretAccessKey])" --output text
Tips for capturing value
  • Prefer the console? In IAM, create a user and give it an inline policy allowing ce:GetCostAndUsage and ce:ListCostAllocationTags on Resource * (or the AWSBillingReadOnlyAccess managed policy), then create an access key under its Security credentials
  • AWS counts a tag's costs only from the day its key is activated. To count up to 12 months before that too, run aws ce start-cost-allocation-tag-backfill --backfill-from YYYY-MM-01T00:00:00Z in the management account's CloudShell, with the first of the month to start from
  • Tag keys and values are case-sensitive, so the Filters on the link have to match the resources' tags exactly
  • Without tag filters, the sync pulls account-wide cost totals — still useful as a baseline or for tracking overall AI spend
  • SageMaker, Bedrock, and Lambda are the most common services for AI initiative cost tracking
AWS

Start with the free AI ROI exposure assessment, then connect AWS once your workspace is set up.

Get your exposure report → Sign in