TopRank Skills

Home / Claw Skills / 数据解析 / aws-price-csv
Official OpenClaw rules 54%

aws-price-csv

Generate AWS cost CSVs from a user-provided service list. Use when someone supplies an item list + AWS region and needs per-item pricing plus totals via AWS Price List API or bulk pricing JSON.

Stars

0

Installs

0

Status

ACTIVE

Visibility

PUBLIC

安装方式

直接复制以下提示词,发送给你的 AI 助手即可完成安装。

请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 aws-price-csv 技能。 若已安装,则直接安装 aws-price-csv 技能。

Overview

Skill Key
crazylion/aws-price-csv
Author
crazylion
Source Repo
openclaw/skills
Version
-
Source Path
skills/crazylion/aws-price-csv
Latest Commit SHA
971e9012b1678f0af6cc52b9108f70b577e7a63d

Extracted Content

SKILL.md excerpt

# AWS Price CSV Skill

## Overview
Transforms a user-provided AWS service list (instances, volumes, S3 buckets, etc.) into a pricing CSV. The script can query the AWS Price List API (via `aws-cli`) or reuse cached bulk JSON files. It supports On-Demand and Reserved terms and automatically adds up per-item and total costs.

## Quick Start
1. Prepare a YAML/JSON file with `name`, `service_code`, `filters`, `term`, and `usage` fields (see sample in `references/api_reference.md`).
2. Pick the data source:
   - **API mode** – requires `aws pricing get-products` permission and an internet connection.
   - **Bulk mode** – no IAM access required; the script downloads/caches public bulk JSON files.
3. Run the script with the region and desired options:
   ```bash
   python3 scripts/generate_pricing_csv.py \
     --input inputs/sample.yml \
     --region ap-northeast-1 \
     --source bulk \
     --cache-dir ~/.cache/aws-price-csv \
     --output quotes/apac_quote.csv
   ```
4. Inspect the CSV (each line item + TOTAL) and deliver alongside the original request if needed.

## Workflow

### 1. Prepare the input list
- Use the YAML/JSON templates in `references/api_reference.md`.
- `filters` must map to AWS pricing attributes (`instanceType`, `regionCode`, `volumeApiName`, `usagetype`, `termType`, etc.).
- `term.type`: `OnDemand` or `Reserved` (`RI`).
- `term.attributes` (optional) filter Reserved prices (`LeaseContractLength`, `PurchaseOption`, `OfferingClass`, ...).
- `usage.quantity` represents the amount to multiply (hours, GB-Mo, requests, ...).

### 2. Choose the data source
| Mode | When to use | Notes |
|------|-------------|-------|
| API (`--source api`) | You already have IAM creds and want real-time data | Uses `aws pricing get-products` in `us-east-1` |
| Bulk (`--source bulk`) | Offline, no IAM, or you want caching | The script checks `--cache-dir` (default `~/.cache/aws-price-csv`); cached files newer than 30 days are reused, otherwise they are re-downloaded |

>...

Related Claw Skills