analyze_dr_strategy
Estimates disaster recovery cost for a selected strategy using live Cost Explorer data. Returns average monthly cost based on strategy and filters.
Instructions
Analyze DR cost for a single strategy using live Cost Explorer data.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top_n | No | Top-N rollup size. Ignored when include_all_services is true. | |
| region | No | Optional AWS region for the boto3 session. Cost Explorer is accessed via us-east-1. | |
| profile | No | Optional AWS named profile. Defaults to the boto3 credential chain. | |
| strategy | Yes | DR strategy id. One of 'backup_restore', 'pilot_light', 'warm_standby', 'active_active'. | |
| months_back | No | Number of complete months of Cost Explorer history to average across (1-24). | |
| tag_filters | No | Optional cost-allocation-tag scope mapping a tag key to accepted values, e.g. {"Project": ["checkout", "payments"], "Environment": ["prod"]}. Keys are ANDed; values within a key are ORed. Scopes the estimate to a tagged workload instead of the whole account/portfolio. Tag keys must be activated as cost allocation tags; untagged resources are excluded from the estimate. | |
| linked_account_ids | No | Optional list of 12-digit AWS account ids to restrict the query to. | |
| include_all_services | No | When true, skip the Top-N rollup. | |
| warm_standby_capacity | No | Fraction of primary compute capacity kept warm in the DR region for the warm_standby strategy (0.1-1.0, default 0.5). Rescales fleet-shaped compute services (EC2, EBS, ECS, EMR) only; databases, storage, and control-plane fees are unaffected. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Populated only when ``success`` is False. | |
| totals | No | Portfolio totals across ``estimates``. Null on error. | |
| success | Yes | True when the call succeeded. False indicates ``error`` is populated. | |
| summary | No | Plain-text 2-4 sentence summary of the analysis. Empty string on error. | |
| strategy | No | Strategy id the analysis was produced for. Null on error. | |
| warnings | No | Non-fatal warnings, for example when the summary generator fell back to its literal placeholder string. | |
| estimates | No | Portfolio-level per-service rows. Includes the synthetic Top-N rollup row when the input contains more than ``top_n`` DR-eligible services and ``include_all_services`` is false. | |
| per_account | No | Per-account sections with per-service detail. For single-account inputs contains exactly one entry whose totals reconcile with the portfolio totals within rounding tolerance. | |
| top_n_rollup | No | Transparent summary of services rolled into the 'Other Services' row. Null when no rollup occurred or when ``include_all_services`` is true. | |
| strategy_label | No | Human-readable strategy label. Null on error. | |
| confidence_summary | No | Dollar-weighted confidence summary across the portfolio. Null on error. |