多厂商云产品映射 Skill,实现 AWS、腾讯云、华为云、Azure 与阿里云的完整映射,涵盖产品名称、实例规格、用量换算及阿里云实时报价。适用于跨云迁移、规格对照、成本估算和询价需求。
Map source cloud vendor (AWS / Tencent Cloud / Huawei Cloud / Azure) resources to Alibaba Cloud with precision, outputting a complete comparison table of product names, instance specs, usage, and reference prices.
VendorIdentifierMapping DataSpec MappingProduct MappingInstance Spec MappingReal-Time PricingAWSawsreferences/mappings/aws.mdreferences/aws-spec.md78 productsFull33 productsTencent Cloudtencentreferences/mappings/tencent.mdreferences/tencent-spec.md85 productsFull33 productsHuawei Cloudhuaweireferences/mappings/huawei.mdreferences/huawei-spec.md83 productsFull33 productsAzureazurereferences/mappings/azure.mdreferences/azure-spec.md78 productsFull33 products
Cross-vendor common rules (Database / Redis / MongoDB / FC / Disk): references/common-spec.md Alibaba Cloud Pricing API Index (33 products): references/pricing-api.md
dict | None syntax)bash
cd .qoder/skills/product-mapping/scripts
pip install -r requirements.txt
Main dependencies:
DependencyPurposeflaskPricing service HTTP frameworkrequestsCalling pricing service and external APIsxlrd / openpyxlRead/write Excel (.xls / .xlsx)aliyun-python-sdk-core / aliyun-python-sdk-bssopenapi / aliyun-python-sdk-ecs / aliyun-python-sdk-rds / aliyun-python-sdk-r-kvstore / aliyunsdkpolardbAlibaba Cloud product SDKs
This Skill relies on the Alibaba Cloud default credential chain for authentication. NEVER explicitly handle AK/SK credentials.
The pricing service uses the default credential provider chain which resolves credentials in the following order:
ALIBABA_CLOUD_ACCESS_KEY_ID / ALIBABA_CLOUD_ACCESS_KEY_SECRET) — set by the runtime environment automatically~/.alibabacloud/credentials)No manual credential configuration is needed. The runtime environment provides credentials automatically.
Mandatory Rules:
POST /api/pricing/batch) to record call traces in api.jsonProhibited: Hardcoding AccessKey in scripts; explicitly reading/exporting AK/SK in Skill instructions; using root account AccessKey.
For detailed RAM permission policies and API permission reference, see references/ram-policies.md.
Supports any one or more of the following formats:
Format 1 - Plain Text:
text
"3 台 EC2 m5.xlarge,2 个 RDS MySQL db.r5.large(500GB),1 个 S3 桶约 2TB"
"4 台腾讯云 CVM S5.LARGE8,1 个 CDB MySQL 4C8G"
Format 2 - JSON:
json
[
{"vendor": "aws", "service": "EC2", "type": "m5.xlarge", "count": 3},
{"vendor": "tencent", "service": "CVM", "type": "S5.LARGE8", "count": 4}
]
Format 3 - Excel Survey / Cloud Vendor Bill CSV
When vendor is not specified, auto-detect from product names in context (EC2/S3 → AWS, CVM/COS → Tencent Cloud, ECS/OBS → Huawei Cloud, VM/Blob → Azure).
Confirm which source cloud vendor (AWS / Tencent Cloud / Huawei Cloud / Azure) the user wants to map. If unclear, prompt user to choose directly; do not assume defaults.
Must confirm with user before pricing; different regions have significant price differences.
--region parameter to excel_mapping.py and pricing service--region value exactly; if mismatch (e.g., falls back to cn-beijing), prompt user to check script parameter parsing or force override ALIBABA_CLOUD_REGION_IDLoad corresponding product mapping table from references/mappings/ based on source vendor. Table structure: Source Product | Alibaba Cloud Product | Recommended Migration Tool | Layer | Complexity.
For source products not in the mapping library, match by category to similar Alibaba Cloud products and annotate with "AI Recommended, please verify manually".
Load spec mapping detail table by source vendor:
CPU:Memory RatioAlibaba Cloud Spec FamilyCategory1:2ecs.c7 / ecs.c8i / ecs.c8a / ecs.c8yCompute-optimized1:4ecs.g7 / ecs.g8i / ecs.g8a / ecs.g8yGeneral-purpose (default)1:8ecs.r7 / ecs.r8i / ecs.r8a / ecs.r8yMemory-optimized1:16+ecs.re7High-memory (SAP HANA)
When mapped spec family is unavailable in target region, fall back in this priority:
Before calling any pricing API, must perform:
Start pricing_service.py — it resolves credentials automatically via the default credential chain
MUST call /api/pricing/batch or corresponding product pricing endpoints
MUST NOT skip API calls under any circumstances
If credential chain resolution fails:
Only when user explicitly replies "no pricing" or "mapping only" can pricing be skipped, with report annotated "Pricing not enabled"
bash
cd .qoder/skills/product-mapping/scripts
pip install -r requirements.txt
# macOS note: AirPlay occupies port 5000, recommend port 5001
PRICING_PORT=5001 python pricing_service.py
Service exposes pricing capabilities for 33 products (see references/pricing-api.md).
POST multiple products at once to /api/pricing/batch to significantly reduce latency. Full examples in references/pricing-api.md.
All pricing service responses are unified JSON. Caller must implement the following; otherwise cost estimates will be inaccurate:
HTTP StatusMeaningAction200 + pricePricing successWrite to report200 + price=null, warningSpec exists but no quoteAnnotate "Reference price missing", fall back to mapping table reference price400 invalid_paramParameter error (e.g., PL1 + <20GB)Validate and retry, auto-downgrade PL1→PL0404 spec_not_foundSpec does not exist / deprecatedFall back by CPU:memory ratio429 rate_limitedAPI rate limitingExponential backoff (1s/2s/4s, max 3 retries)5xx / timeoutUpstream exceptionRetry once per item; annotate "Pricing failed" on failureCredential missing / 403AccessKey not configured or insufficient permissionsMust stop execution and prompt user, no silent fallback
Mandatory Requirements:
VendorMapped ProductsAPI Real-Time PricingFree/No Pricing NeededEffective CoverageAWS78411369.2%Azure78371465.4%Tencent Cloud85391462.4%Huawei Cloud83381361.4%
Detailed list with product_code/parameters for each product: references/pricing-api.md
| # | Source Product | Alibaba Cloud Product | Recommended Migration Tool | Layer | Migration Complexity | Notes |
| Resource Type | Source Spec x Qty | Alibaba Cloud Spec x Qty | Source Monthly Cost (ref) | Alibaba Cloud Monthly Cost (ref) | Savings % |
text
┌──────────────────────────────────────┐
│ Alibaba Cloud Monthly Cost Estimate │
├──────────────────────────────────────┤
│ Compute: ECS ¥ xxx │
│ Database: RDS/PolarDB ¥ xxx │
│ Cache: Redis/Tair ¥ xxx │
│ Storage: OSS+Disk+NAS ¥ xxx │
│ Network: SLB+CDN+EIP ¥ xxx │
│ Other: Kafka/FC/SLS etc ¥ xxx │
├──────────────────────────────────────┤
│ Monthly Total: ¥ xxxxx │
│ Annual Est.(85%): ¥ xxxxx │
│ 3-Year Est.(50%): ¥ xxxxx │
└──────────────────────────────────────┘
Ordered by risk from low to high:
Read resource survey Excel via script, auto-complete product mapping, spec mapping, real-time pricing, and output results to Excel.
bash
cd .qoder/skills/product-mapping/scripts
pip install -r requirements.txt
PRICING_PORT=5001 python pricing_service.py &
python excel_mapping.py <input.xls> --output result.xlsx --pricing-url http://localhost:5001 --region <user-specified-region>
Input: Excel file with each Sheet representing one AWS product (EC2 / S3 / ElasticCache / DocumentDB / AuroraDB / NAT / Load Balancer / EIP / Lambda / Athena / EventBridge / SNS / CloudWatchLog / Other).
Output: *_mapping_result.xlsx with 10 Sheets (Product Mapping Summary, EC2 Spec Details, Database Details, Cache Details, Storage Details, Network Details, Other Services, Cost Summary, Migration Priority, Coverage Report).
Practical Tips: ECS deduplicates pricing by (spec, system disk, data disk, PL) tuple; system disk minimum 20GB; data disk < 20GB downgrade to PL0; t6 burst xlarge+ falls back to ecs.c8y; recommended port 5001.
Credential Requirement: The pricing service resolves credentials automatically via the default credential chain. Always start pricing_service.py and call /api/pricing/batch; do not skip API calls. If 401/403 returned, annotate per Section 5.3 error table.
All HTTP requests made by pricing_service.py to Alibaba Cloud OpenAPI MUST include a User-Agent header following this template:
text
AlibabaCloud-Agent-Skills/alibabacloud-migration-mas-product-mapping/{session-id}
session-idsession-id MUST be used across all API calls within a single user interactiona1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6SKILL_SESSION_ID when starting pricing_service.pybash
export SKILL_SESSION_ID=$(python3 -c "import uuid; print(uuid.uuid4().hex)")
PRICING_PORT=5001 SKILL_SESSION_ID=$SKILL_SESSION_ID python pricing_service.py
text
.qoder/skills/product-mapping/
├── SKILL.md # This file (entry point and workflow)
├── references/ # Spec mapping details and pricing API index
│ ├── mappings/ # Product-level mapping data
│ │ ├── aws.md
│ │ ├── tencent.md
│ │ ├── huawei.md
│ │ └── azure.md
│ ├── aws-spec.md
│ ├── tencent-spec.md
│ ├── huawei-spec.md
│ ├── azure-spec.md
│ ├── common-spec.md # Cross-vendor common rules (RDS/Redis/MongoDB/FC/Disk/Others)
│ └── pricing-api.md # Pricing API index + error handling
├── scripts/ # Python pricing service and Excel batch processing
│ ├── requirements.txt
│ ├── pricing_service.py # Flask pricing service (port 5001)
│ ├── excel_mapping.py # Excel batch processing entry point
│ ├── azure_mapping.py
│ ├── huawei_mapping.py
│ ├── price_comparison.py
│ ├── tc_price_comparison.py
│ └── hw_price_comparison.py
└── evals/ # Evaluation test cases