What You'll Need to Provide in Costory
Storage Account Name
Container Name
SAS Token
Costory will auto-detect the export prefixes for both Actual and Amortized costs.
Step 1: Create a Billing Export in Azure
1.1 Access Azure Cost Management
Navigate to Azure Cost Management Exports
Ensure you are viewing the correct billing scope
1.2 Create an Export
Click Create Export
Select Cost and Usage (Actual + Amortized) template (if available)
Otherwise, manually create both exports:
Cost and Usage Reports (Actual)
Cost and Usage Reports (Amortized)
Set Frequency to Daily export for month-to-date costs
Click Next
1.3 Configure the Destination
Select an export pre-fix (prefixed will be autodetected by Costory so you can choose any naming)
Create or select a Storage Account
Create a new container for the data (allows isolated access for Costory)
Configure the export:
Format:
ParquetCompression:
SnappyDirectory: e.g.,
exportCostoryOverwrite Data:
Enable
Click Create
1.4 Trigger an Immediate Export
Return to Azure Cost Management Exports
Select the export(s) you created
Click Run Now
Note: The first export typically completes within 1-2 hours.
Step 2: Grant Costory Access to the Container
We'll generate a SAS token with an access policy following Azure best practices.
2.1 Locate the Storage Account
Return to Azure Cost Management Exports
Click on your export, then click the associated Storage Account
Note the Storage Account Name for later
2.2 Access the Container
In the storage account menu, select Containers
Open the container where your exports are stored
Note the Container Name for later
2.3 Set Up an Access Policy
Navigate to the Access Policy tab
Click Add Policy
Grant permissions:
Read
List
Set the time range:
Start time: Today
End time: Far enough in the future (e.g., 2+ years)
Click OK and Save
2.4 Generate a SAS Token
In the container menu, go to Shared Access Tokens
Select the access policy you just created
Click Generate SAS token and URL
Copy the SAS Token (starts with
?sv=...or similar)
Step 3: Configure in Costory
Go to Costory → Datasources → Billing
Click Import New Billing Datasource → Select Azure
Enter your credentials:
Storage Account Name (e.g.,
mystorageaccount)Container Name (e.g.,
costexports)SAS Token (e.g.,
?sv=2022-11-02&ss=b&srt=sco&sp=rl...)
Click Check Available Files
Costory will auto-detect your export prefixes:
Actual Cost Prefix (required)
Amortized Cost Prefix (optional, if available)
Confirm or adjust the prefixes, then click Validate
Click Import Datasource
Data will be available the next day.
Step 4: Trigger a Backfill (Important)
Costory features like Digest require historical data. Backfill at least 3 months, ideally from the beginning of the year.
Return to Azure Cost Management Exports
Select your export(s)
Click Export selected dates
Export data in 1-month chunks (Azure limitation)
You can backfill up to 13 months of data


