$npx -y skills add aws-samples/sample-agent-skills-for-builders --skill cost-estimatorEstimate AWS costs for CDK projects using real-time pricing data. Use when calculating infrastructure costs, generating pricing reports, or analyzing CDK resource costs before deployment.
| 1 | # Cost Estimator |
| 2 | |
| 3 | AWS cost estimation tool for CDK projects with real-time pricing from AWS Price List Bulk API. |
| 4 | |
| 5 | ## When to Apply |
| 6 | |
| 7 | Reference this skill when: |
| 8 | - Estimating AWS infrastructure costs |
| 9 | - Analyzing CDK project resource costs |
| 10 | - Generating pricing reports (Excel/Markdown) |
| 11 | - Comparing costs across AWS regions |
| 12 | - Calculating Bedrock model costs |
| 13 | |
| 14 | ## How It Works |
| 15 | |
| 16 | 1. **Confirm Region** - Select target AWS region(s) |
| 17 | 2. **Scan Resources** - Analyze CDK code for AWS resources |
| 18 | 3. **Fetch Pricing** - Get real-time prices from AWS Bulk API |
| 19 | 4. **Generate Reports** - Create Excel and Markdown reports |
| 20 | |
| 21 | ## Prerequisites |
| 22 | |
| 23 | - AWS CDK project with synthesizable stacks |
| 24 | - Python 3.8+ with pandas, openpyxl |
| 25 | - AWS credentials (for pricing API access) |
| 26 | |
| 27 | ## Usage |
| 28 | |
| 29 | ```bash |
| 30 | # Fetch AWS pricing data |
| 31 | python scripts/fetch-aws-pricing.py --region us-east-1 |
| 32 | |
| 33 | # Generate Excel report |
| 34 | python scripts/generate-pricing-excel.py --input resources.json --output costs.xlsx |
| 35 | ``` |
| 36 | |
| 37 | ## Output Files |
| 38 | |
| 39 | Reports are saved to `cost-estimates/`: |
| 40 | - `cost-estimate-{region}.xlsx` - Detailed Excel report |
| 41 | - `cost-estimate-{region}.md` - Markdown summary |
| 42 | |
| 43 | ## Supported Regions |
| 44 | |
| 45 | - All standard AWS regions |
| 46 | - China regions (cn-north-1, cn-northwest-1) with CNY pricing |
| 47 | |
| 48 | ## References |
| 49 | |
| 50 | - [CDK Analysis](./references/cdk-analysis.md) - Resource scanning guide |
| 51 | - [Pricing API](./references/pricing-api.md) - AWS Bulk API usage |
| 52 | - [Report Generation](./references/report-generation.md) - Report creation |
| 53 | - [Bedrock Pricing](./references/bedrock-pricing.md) - AI model pricing |