Wondering if I can set up a CUR (2.0) to query past data. As far as I understand from the documentation [1], the export will be written to the S3 bucket from the creation date looking back until the beginning of the billing period (then updated until the end, then a new export is created).
Is there a way to create a report for a previous period / periods?
Example CFN:
CURReportDefinition:
DependsOn: S3ClientBucketAccessPolicy
Type: AWS::BCMDataExports::Export
Properties:
Export:
DataQuery:
QueryStatement: "SELECT <columns> FROM COST_AND_USAGE_REPORT"
TableConfigurations:
COST_AND_USAGE_REPORT:
INCLUDE_RESOURCES: "TRUE"
INCLUDE_SPLIT_COST_ALLOCATION_DATA: "TRUE"
TIME_GRANULARITY: "HOURLY"
DestinationConfigurations:
S3Destination:
S3Bucket: !Ref S3ClientBucket
S3Region: !Ref Region
S3Prefix: ""
S3OutputConfigurations:
Compression: "PARQUET"
Format: "PARQUET"
OutputType: "CUSTOM"
Overwrite: "CREATE_NEW_REPORT"
Name: <export name>
RefreshCadence:
Frequency: "SYNCHRONOUS"
[1] https://docs.aws.amazon.com/cur/latest/userguide/what-is-cur.html
I am aware. That means I am getting new files, keeping the old ones. It doesn't affect how far back the report (or reports) looks.