Skip to main content

AWS Cost Explorer

This connector captures daily monetary costs from the AWS Cost Explorer API into Estuary collections.

Supported data resources​

ResourceRowReplication Mode
daily_costsUTC usage dayPeriodic keyed refresh
daily_costs_by_serviceUTC usage day and servicePeriodic keyed refresh
daily_costs_by_linked_accountUTC usage day and linked account IDPeriodic keyed refresh

Each resource is mapped to its own collection. Keys are date, date plus service, and date plus linked_account_id, respectively. Linked account names are included when AWS returns them.

All resources include date, exclusive period_end, estimated, and a metrics object with UnblendedCost, BlendedCost, AmortizedCost, NetUnblendedCost, and NetAmortizedCost. Each metric contains amount as an exact decimal string and unit. Usage quantities are excluded because combining services can combine incompatible units.

tip

Each sync reads complete days through yesterday UTC. The first sync, and any backfill, reads from the start date. Later syncs reread from the first day of the month before the previous sync, which picks up estimates and billing corrections until AWS finalizes each month. Without a start date, each sync rereads the last 30 days.

Older captured rows remain as last observed when they leave AWS's available history. Missing rows do not produce deletion events, including missing service or account groups within the available range. Explicit zero-cost values returned by AWS update existing rows. Costs outside AWS's retention can no longer be refreshed, and data that expired before the connector first captured it cannot be recovered through this API.

AWS provides daily data for the current month and previous 13 months. Each poll clamps its query to that available range. See Cost Explorer API best practices.

Each resource syncs once every 24 hours by default, and no more often. AWS charges $0.01 per requested API page. Each resource requests at least one page per sync. The first sync and backfills read the whole start-date range, which takes more pages, especially for daily_costs_by_service. Retries and validation add requests. See Cost Explorer pricing.

Prerequisites​

  • Enable Cost Explorer. AWS can take time to prepare the initial data.
  • Provide AWS credentials with ce:GetCostAndUsage. The connector only reads cost data.
  • To capture organization-wide costs, use credentials in the organization management account with the necessary billing visibility. Member accounts see the data AWS permits them to access.

A minimal IAM policy is:

{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "ce:GetCostAndUsage",
"Resource": "*"
}
]
}

The connector signs requests using the AWS SDK and a long-term access key. The Cost Explorer endpoint is https://ce.us-east-1.amazonaws.com, regardless of the regions where usage occurred.

Configuration​

Configure the connector in the Estuary web app or a catalog specification.

Endpoint properties​

PropertyTitleDescriptionTypeRequired/Default
/credentials/credentials_titleAuthenticationSet to AWS Access Key.stringAWS Access Key
/credentials/access_key_idAccess Key IDAWS access key ID.stringRequired
/credentials/secret_access_keySecret Access KeyAWS secret access key.stringRequired
/start_dateStart DateTimestamp whose containing UTC date is the first usage day to capture.stringThe last 30 days

Binding properties​

PropertyTitleDescriptionTypeRequired/Default
/nameData resourceOne of the supported resource names.stringRequired
/intervalIntervalTime between the starts of consecutive refreshes, as an ISO 8601 duration. At least P1D.stringP1D

Sample​

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-aws-cost-explorer:v1
config:
credentials:
credentials_title: AWS Access Key
access_key_id: <access-key-id>
secret_access_key: <secret-access-key>
start_date: 2026-01-01T00:00:00Z
bindings:
- resource:
name: daily_costs
interval: P1D
target: ${PREFIX}/daily_costs
- resource:
name: daily_costs_by_service
interval: P1D
target: ${PREFIX}/daily_costs_by_service
- resource:
name: daily_costs_by_linked_account
interval: P1D
target: ${PREFIX}/daily_costs_by_linked_account