You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tracking issue for the Cost Explorer (ce:*) service — PR 2 of 3 from the scope discussion in #791.
Blocked by the AWS Pricing API service in #821 (cost synthesis consumes the Pricing snapshot).
Scope
AWS Cost Explorer API, JSON 1.1, X-Amz-Target: AWSInsightsIndexService.<Action> (signing name ce, endpoint prefix ce).
Operations:
GetCostAndUsage — full support for TimePeriod, Granularity (DAILY / MONTHLY / HOURLY), Metrics (UnblendedCost, BlendedCost, AmortizedCost, NetUnblendedCost, NetAmortizedCost, UsageQuantity, NormalizedUsageAmount), GroupBy, and the recursive Filter expression tree (And / Or / Not / Dimensions / Tags / CostCategories).
GetCostAndUsageWithResources — same shape, includes resource-level breakdown from Floci's existing resource state.
GetDimensionValues — returns dimension values available in Floci's synthesized data.
GetTags — returns tag keys/values across Floci resource state.
GetReservationCoverage + GetReservationUtilization — stubs backed by static "no RI" responses unless an RI fixture is supplied.
GetSavingsPlansCoverage + GetSavingsPlansUtilization — same stub approach.
The GroupBy / Filter expression applied after synthesis.
GroupBy=RECORD_TYPE must distinguish Usage, Credit, Tax, Refund, DiscountedUsage, SavingsPlanCoveredUsage, SavingsPlanNegation, SavingsPlanUpfrontFee, SavingsPlanRecurringFee — essential for testing any code path that separates gross usage from net billable outlay (credit-offset accounts, spend-limit checks, invoice-reconciliation code).
A single config knob for synthetic-credit injection (neutral name, matches Floci's existing FLOCI_SERVICES_<SVC>_* convention):
FLOCI_SERVICES_CE_CREDIT_USD_MONTHLY
emits a monthly Credit line item that offsets min(credit, usage) — gives downstream tools a deterministic way to exercise credit-offset logic without synthesizing their own fixtures.
Size estimate
~1000-1500 LOC Java + docs/services/ce.md.
Non-goals
Anomaly detection (split into a separate PR; ce:GetAnomalies etc.).
CUR emission (covered by PR 3, see separate tracking issue).
Right-sizing recommendations (ce:GetRightsizingRecommendation) — out of scope for initial landing.
Open question for maintainers
The cost-synthesis path is a new shape in the repo (every other service either reads persisted state directly or returns a stub). Happy to go either way on:
A single concrete CostSynthesisBackend implementation with well-defined extension points, or
A formal SPI that downstream users can swap out entirely.
Option 1 keeps things minimal; option 2 is more future-proof if you anticipate users wanting non-trivial billing models (EDP discounts, custom Savings Plan math). Leaning toward option 1 unless you have a strong preference.
Tracking issue for the Cost Explorer (
ce:*) service — PR 2 of 3 from the scope discussion in #791.Blocked by the AWS Pricing API service in #821 (cost synthesis consumes the Pricing snapshot).
Scope
AWS Cost Explorer API, JSON 1.1,
X-Amz-Target: AWSInsightsIndexService.<Action>(signing namece, endpoint prefixce).Operations:
GetCostAndUsage— full support forTimePeriod,Granularity(DAILY/MONTHLY/HOURLY),Metrics(UnblendedCost,BlendedCost,AmortizedCost,NetUnblendedCost,NetAmortizedCost,UsageQuantity,NormalizedUsageAmount),GroupBy, and the recursiveFilterexpression tree (And/Or/Not/Dimensions/Tags/CostCategories).GetCostAndUsageWithResources— same shape, includes resource-level breakdown from Floci's existing resource state.GetDimensionValues— returns dimension values available in Floci's synthesized data.GetTags— returns tag keys/values across Floci resource state.GetReservationCoverage+GetReservationUtilization— stubs backed by static "no RI" responses unless an RI fixture is supplied.GetSavingsPlansCoverage+GetSavingsPlansUtilization— same stub approach.GetCostCategories+GetCostCategoryDefinition— minimal definitions list; empty if none configured.Approach
Cost data is synthesized on each request from:
TimePeriod.(serviceCode, regionCode, usageType, …)).GroupBy/Filterexpression applied after synthesis.GroupBy=RECORD_TYPEmust distinguishUsage,Credit,Tax,Refund,DiscountedUsage,SavingsPlanCoveredUsage,SavingsPlanNegation,SavingsPlanUpfrontFee,SavingsPlanRecurringFee— essential for testing any code path that separates gross usage from net billable outlay (credit-offset accounts, spend-limit checks, invoice-reconciliation code).A single config knob for synthetic-credit injection (neutral name, matches Floci's existing
FLOCI_SERVICES_<SVC>_*convention):emits a monthly Credit line item that offsets
min(credit, usage)— gives downstream tools a deterministic way to exercise credit-offset logic without synthesizing their own fixtures.Size estimate
~1000-1500 LOC Java +
docs/services/ce.md.Non-goals
ce:GetAnomaliesetc.).ce:GetRightsizingRecommendation) — out of scope for initial landing.Open question for maintainers
The cost-synthesis path is a new shape in the repo (every other service either reads persisted state directly or returns a stub). Happy to go either way on:
CostSynthesisBackendimplementation with well-defined extension points, orOption 1 keeps things minimal; option 2 is more future-proof if you anticipate users wanting non-trivial billing models (EDP discounts, custom Savings Plan math). Leaning toward option 1 unless you have a strong preference.
Reference