Audit and manage AWS Cost Explorer API usage from platform-backend
Check, estimate, and toggle AWS Cost Explorer API costs from the platform-backend cache warmer.
Determine the target cluster:
--cluster flag if providedinfra-use2-mgmt-onprem-0-ext (onprem mgmt)Find the platform-backend namespace:
kubectl --context <CTX> get pods -A 2>&1 | grep -i 'pfb\|platform-back'
Read the plugins and cache warmer configmaps:
CTX="<context>"
NS="<pfb-namespace>"
echo "=== PLUGINS ==="
kubectl --context $CTX -n $NS get configmap <ns>-plugins -o jsonpath='{.data.plugins\.yaml}' | python3 -m json.tool
echo "=== CACHE WARMER ==="
kubectl --context $CTX -n $NS get configmap <ns>-cw -o jsonpath='{.data.tasks\.yaml}' | python3 -m json.tool
Calculate based on current settings:
cost_per_run = num_apps x calls_per_app x $0.01
runs_per_day = 86400 / interval_seconds
daily_cost = cost_per_run x runs_per_day
monthly_cost = daily_cost x 30
Report:
AWS Cost Explorer API Estimate:
Apps: N
Calls per run: N x 4 = N
Interval: Ns (every Nh)
Runs per day: N
Daily cost: $X.XX
Monthly cost: $X.XX
To disable:
cost.settings.aws_cost_enabled to falsetasks.aws-cost.enabled to falseTo enable:
true)Compare current config against the planned batch-query design:
Report status and next steps.
| Superpowers Skill | When to Use |
|---|---|
/superpowers:verification-before-completion | After toggling -- verify the change took effect |