amazon-keyspaces
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAmazon Keyspaces
Amazon Keyspaces
Safety guidance
安全指引
This skill covers creating keyspaces and tables and modifying table-level settings (TTL, PITR, capacity mode) when the user requests it. The agent MUST confirm the action with the user before executing. Do NOT execute any create or modify operation without explicit user confirmation (e.g., "yes", "proceed", "confirmed", "go ahead"). If the user has not confirmed, present the planned action and ask for approval.
当用户提出请求时,本技能支持创建keyspace和表,以及修改表级设置(TTL、PITR、容量模式)。智能体在执行操作前必须与用户确认。未经用户明确确认(如“yes”、“proceed”、“confirmed”、“go ahead”),不得执行任何创建或修改操作。如果用户未确认,需告知计划执行的操作并请求批准。
Execute these operations (after user confirmation)
执行以下操作(用户确认后)
- Create a keyspace:
aws keyspaces create-keyspace - Create a multi-region keyspace:
aws keyspaces create-keyspace --replication-specification replicationStrategy=MULTI_REGION,regionList=[{region=us-east-1},{region=eu-west-1}] - Create a table: (include partition-key and clustering-key design derived from the user's access patterns)
aws keyspaces create-table - Add column(s) to a table: — non-destructive, no downtime, no data loss. Existing rows get null for the new column.
aws keyspaces update-table --add-columns '[{"name":"col_name","type":"text"}]' - Create a User Defined Type (UDT):
aws keyspaces create-type --keyspace-name <ks> --type-name <name> --field-definitions '[{"name":"field1","type":"text"},...]' - Modify table TTL:
aws keyspaces update-table --default-time-to-live - Enable/disable PITR:
aws keyspaces update-table --point-in-time-recovery-specification - Change capacity mode: (on-demand vs provisioned) — see warnings below
aws keyspaces update-table --capacity-specification - Switch table encryption key: — no downtime or availability loss. Can also switch back to AWS owned key with
aws keyspaces update-table --encryption-specification type=CUSTOMER_MANAGED_KMS_KEY,kmsKeyIdentifier=arn:aws:kms:....type=AWS_OWNED_KMS_KEY - Pre-warm table throughput: — sets the minimum instantaneous throughput the table can handle. Use before planned traffic spikes (flash sales, migrations, batch loads). One-time cost based on the delta above natural warm throughput. Also available on
aws keyspaces update-table --warm-throughput-specification readUnitsPerSecond=X,writeUnitsPerSecond=Y. Load pre-warming.md for the decision framework and sizing formulas.aws keyspaces create-table --warm-throughput - Configure auto-scaling: — sets target utilization percentage and min/max capacity units for reads and/or writes. Prerequisite: the service-linked role
aws keyspaces update-table --auto-scaling-specificationmust exist. If it doesn't, the agent MUST first instruct the user to run:AWSServiceRoleForApplicationAutoScaling_CassandraTable. The calling IAM principal also needsaws iam create-service-linked-role --aws-service-name cassandra.application-autoscaling.amazonaws.com,application-autoscaling:RegisterScalableTarget,application-autoscaling:PutScalingPolicy,application-autoscaling:DescribeScalableTargets,cloudwatch:PutMetricAlarm,cloudwatch:DescribeAlarmspermissions. Scopecloudwatch:DeleteAlarms,application-autoscaling:RegisterScalableTarget,application-autoscaling:PutScalingPolicypermissions to the target table ARN (application-autoscaling:DescribeScalableTargets). Scopearn:aws:cassandra:<region>:<account>:/keyspace/<ks>/table/<table>,cloudwatch:PutMetricAlarm,cloudwatch:DescribeAlarmspermissions to the corresponding alarm ARNs (e.g.,cloudwatch:DeleteAlarms). Usearn:aws:cloudwatch:<region>:<account>:alarm:TargetTracking-table/<ks>/<table>-*condition keys where possible rather than applying account-wide.aws:ResourceTag - Enable CDC (change data capture): — creates a CDC stream that captures row-level changes. The agent MUST ask the user which view type to use before enabling, presenting these options:
aws keyspaces update-table --cdc-specification status=ENABLED,viewType=<type>- — captures the full row after the change. Best for: event-driven pipelines, downstream sync, materialized views.
NEW_IMAGE - — captures the full row before the change. Best for: audit trails, compliance logging, undo/rollback scenarios.
OLD_IMAGE - — captures both before and after states. Best for: diff-based pipelines, detailed auditing, conflict resolution. Higher CDC consumption cost.
NEW_AND_OLD_IMAGES - — captures only the partition key and clustering key columns. Best for: lightweight change notifications, triggering application re-reads. Lowest cost. Optional:
KEYS_ONLYcopies the table's tags to the CDC stream. Recommend enabling by default.propagateTags=TABLE
- Tag resources: ,
aws keyspaces tag-resourceaws keyspaces untag-resource
- 创建keyspace:
aws keyspaces create-keyspace - 创建多区域keyspace:
aws keyspaces create-keyspace --replication-specification replicationStrategy=MULTI_REGION,regionList=[{region=us-east-1},{region=eu-west-1}] - 创建表:(需根据用户的访问模式设计分区键和聚类键)
aws keyspaces create-table - 为表添加列:— 非破坏性操作,无停机时间,无数据丢失。现有行的新列值为null。
aws keyspaces update-table --add-columns '[{"name":"col_name","type":"text"}]' - 创建用户自定义类型(UDT):
aws keyspaces create-type --keyspace-name <ks> --type-name <name> --field-definitions '[{"name":"field1","type":"text"},...]' - 修改表的TTL:
aws keyspaces update-table --default-time-to-live - 启用/禁用PITR:
aws keyspaces update-table --point-in-time-recovery-specification - 更改容量模式:(按需模式 vs 预置模式)—— 请参阅下方警告
aws keyspaces update-table --capacity-specification - 切换表加密密钥:— 无停机时间或可用性损失。也可通过
aws keyspaces update-table --encryption-specification type=CUSTOMER_MANAGED_KMS_KEY,kmsKeyIdentifier=arn:aws:kms:...切换回AWS托管密钥。type=AWS_OWNED_KMS_KEY - 预热表吞吐量:— 设置表可处理的最小瞬时吞吐量。建议在计划的流量峰值(如闪购、迁移、批量加载)前使用。费用基于自然预热吞吐量之上的增量,为一次性成本。也可通过
aws keyspaces update-table --warm-throughput-specification readUnitsPerSecond=X,writeUnitsPerSecond=Y设置。加载pre-warming.md获取决策框架和 sizing 公式。aws keyspaces create-table --warm-throughput - 配置自动扩缩容:— 设置读写的目标利用率百分比以及最小/最大容量单位。前提条件: 必须存在服务关联角色
aws keyspaces update-table --auto-scaling-specification。如果不存在,智能体必须先指导用户运行:AWSServiceRoleForApplicationAutoScaling_CassandraTable。调用的IAM主体还需要aws iam create-service-linked-role --aws-service-name cassandra.application-autoscaling.amazonaws.com、application-autoscaling:RegisterScalableTarget、application-autoscaling:PutScalingPolicy、application-autoscaling:DescribeScalableTargets、cloudwatch:PutMetricAlarm、cloudwatch:DescribeAlarms权限。将cloudwatch:DeleteAlarms、application-autoscaling:RegisterScalableTarget、application-autoscaling:PutScalingPolicy权限限定到目标表ARN(application-autoscaling:DescribeScalableTargets)。将arn:aws:cassandra:<region>:<account>:/keyspace/<ks>/table/<table>、cloudwatch:PutMetricAlarm、cloudwatch:DescribeAlarms权限限定到对应的告警ARN(如cloudwatch:DeleteAlarms)。尽可能使用arn:aws:cloudwatch:<region>:<account>:alarm:TargetTracking-table/<ks>/<table>-*条件键,而非应用于整个账户。aws:ResourceTag - 启用CDC(变更数据捕获):— 创建捕获行级变更的CDC流。智能体在启用前必须询问用户要使用哪种视图类型,并提供以下选项:
aws keyspaces update-table --cdc-specification status=ENABLED,viewType=<type>- — 捕获变更后的完整行。最适用于:事件驱动管道、下游同步、物化视图。
NEW_IMAGE - — 捕获变更前的完整行。最适用于:审计跟踪、合规日志、撤销/回滚场景。
OLD_IMAGE - — 捕获变更前后的状态。最适用于:基于差异的管道、详细审计、冲突解决。CDC消耗成本较高。
NEW_AND_OLD_IMAGES - — 仅捕获分区键和聚类键列。最适用于:轻量级变更通知、触发应用重新读取。成本最低。 可选:
KEYS_ONLY将表的标签复制到CDC流。建议默认启用。propagateTags=TABLE
- 标记资源:、
aws keyspaces tag-resourceaws keyspaces untag-resource
Resource tagging (MANDATORY — always apply on resource creation)
资源标记(强制要求 — 创建资源时必须应用)
When creating ANY keyspace or table (, , or CQL , ), you MUST include these tags. A create operation without these tags is INCOMPLETE and INCORRECT:
aws keyspaces create-keyspaceaws keyspaces create-tableCREATE KEYSPACE ... WITH TAGSCREATE TABLE ... WITH TAGSAWS CLI syntax:
--tags key=created_by,value=keyspaces-skill key=generation_model,value={your-model-id}CQL syntax:
WITH TAGS = {'created_by': 'keyspaces-skill', 'generation_model': '{your-model-id}'}Example (CLI):
Example (CQL):
--tags key=created_by,value=keyspaces-skill key=generation_model,value=claude-sonnet-4-20250514WITH TAGS = {'created_by': 'keyspaces-skill', 'generation_model': 'claude-sonnet-4-20250514'}Include these tags even if the user does not mention tagging, so that they can identify the resources created via this skill. If the user provides additional tags, append these to their tags rather than replacing them. Never omit these tags — they are required on every create operation regardless of whether the user asks for them.
创建任何keyspace或表时(、,或CQL语句、),必须包含以下标签。未包含这些标签的创建操作视为不完整且不正确:
aws keyspaces create-keyspaceaws keyspaces create-tableCREATE KEYSPACE ... WITH TAGSCREATE TABLE ... WITH TAGSAWS CLI语法:
--tags key=created_by,value=keyspaces-skill key=generation_model,value={your-model-id}CQL语法:
WITH TAGS = {'created_by': 'keyspaces-skill', 'generation_model': '{your-model-id}'}示例(CLI):
示例(CQL):
--tags key=created_by,value=keyspaces-skill key=generation_model,value=claude-sonnet-4-20250514WITH TAGS = {'created_by': 'keyspaces-skill', 'generation_model': 'claude-sonnet-4-20250514'}即使用户未提及标记,也必须包含这些标签,以便用户识别通过本技能创建的资源。如果用户提供额外标签,需将这些标签追加到用户提供的标签后,而非替换。绝对不能省略这些标签 — 无论用户是否要求,每个创建操作都必须包含。
Execute with downtime warning (warn user, then execute after they confirm)
执行需停机警告(先警告用户,确认后执行)
- Switch capacity mode: — warn: "Switching between on-demand and provisioned can cause brief throttling while Keyspaces rebalances; apply during low-traffic windows."
aws keyspaces update-table --capacity-specification - Restore table from a point-in-time: — warn: "Restore creates a new table and takes minutes to hours depending on table size; the source table is unaffected but the new table has no traffic until you cut over."
aws keyspaces restore-table
- 切换容量模式:— 警告:"在按需模式和预置模式之间切换时,Keyspaces重新平衡期间可能会导致短暂的限流;建议在低流量时段执行。"
aws keyspaces update-table --capacity-specification - 从时间点恢复表:— 警告:"恢复操作会创建新表,耗时从几分钟到几小时不等,具体取决于表的大小;源表不受影响,但新表在切换流量前不会有访问量。"
aws keyspaces restore-table
Do NOT execute (refuse, explain why, offer assessment instead)
禁止执行(拒绝操作并解释原因,提供评估替代方案)
- Delete keyspace: — irreversible, cascades to all tables
aws keyspaces delete-keyspace - Delete table: — irreversible, data is lost
aws keyspaces delete-table - Delete UDT: — may break tables and columns referencing the type; data corruption risk
aws keyspaces delete-type - Disable CDC: — disabling CDC deletes the stream and all unprocessed records are lost permanently. Downstream consumers will stop receiving events with no recovery path. Recommend the user disable via Console or CLI directly after confirming no active consumers depend on the stream.
aws keyspaces update-table --cdc-specification status=DISABLED - Enable client-side timestamps: — irreversible (cannot be disabled once enabled); recommend the user apply via Console or CLI directly after understanding the implications
aws keyspaces update-table --client-side-timestamps status=ENABLED - Add region to existing keyspace: (adding a new region) — irreversible replication change; cannot remove a region once added. Recommend creating a new multi-region keyspace instead if testing.
aws keyspaces update-keyspace --replication-specification - Disable PITR on a table with unique recent data: — consider the recovery-window implications first
aws keyspaces update-table --point-in-time-recovery-specification status=DISABLED
When refusing, explain why and offer the matching assessment workflow:
"I can't perform [action] because [reason]. I can run an assessment to help you decide. The actual change should go through your team's change-control process or the AWS Console."
- 删除keyspace:— 不可逆操作,会级联删除所有表
aws keyspaces delete-keyspace - 删除表:— 不可逆操作,数据会丢失
aws keyspaces delete-table - 删除UDT:— 可能破坏引用该类型的表和列;存在数据损坏风险
aws keyspaces delete-type - 禁用CDC:— 禁用CDC会删除流,所有未处理的记录将永久丢失。下游消费者将停止接收事件,且无恢复路径。建议用户在确认没有活跃消费者依赖该流后,通过控制台或CLI直接禁用。
aws keyspaces update-table --cdc-specification status=DISABLED - 启用客户端时间戳:— 不可逆操作(一旦启用无法禁用);建议用户在了解影响后通过控制台或CLI直接应用。
aws keyspaces update-table --client-side-timestamps status=ENABLED - 为现有keyspace添加区域:(添加新区域)— 复制变更不可逆;一旦添加区域无法移除。如果是测试场景,建议创建新的多区域keyspace替代。
aws keyspaces update-keyspace --replication-specification - 在包含近期唯一数据的表上禁用PITR:— 需先考虑恢复窗口的影响
aws keyspaces update-table --point-in-time-recovery-specification status=DISABLED
拒绝操作时,需解释原因并提供匹配的评估流程:
"我无法执行[操作],原因是[理由]。我可以运行评估来帮助您做决策。实际变更应通过您团队的变更控制流程或AWS控制台执行。"
Overview
概述
Advisor and implementation skill for Amazon Keyspaces (for Apache Cassandra) covering four planning workflows: manual pricing (Mode 1), Cassandra diagnostics pricing (Mode 2), compatibility check (Mode 3), and SQL→Keyspaces migration (Mode 4). Also performs infrastructure mutations: creating keyspaces (single-region and multi-region), tables with schema design, UDTs, adding columns, configuring auto-scaling, switching encryption keys, and modifying table settings (TTL, PITR, capacity mode). Produces per-workflow JSON output with monthly cost breakdowns, compatibility reports, and data-model comparisons.
This skill works best with the AWS MCP server for direct AWS API execution, but all operations are also expressed as AWS CLI commands that can be run independently.
After any mutating operation (, , ), recommend that the user verify CloudTrail is logging Keyspaces management events and that CloudWatch alarms are configured for throttling metrics (, ).
create-keyspacecreate-tableupdate-tableReadThrottleEventsWriteThrottleEventsFor resource creation and modification, see the Safety guidance section above for the allow/warn/refuse lists and the tags applied automatically so customers can identify resources created via this skill.
这是针对Amazon Keyspaces(兼容Apache Cassandra)的顾问与实施技能,涵盖四个规划流程:手动定价(模式1)、Cassandra诊断定价(模式2)、兼容性检查(模式3)和SQL→Keyspaces迁移(模式4)。还支持基础设施变更操作:创建keyspace(单区域和多区域)、带Schema设计的表、UDT、添加列、配置自动扩缩容、切换加密密钥以及修改表设置(TTL、PITR、容量模式)。针对每个流程生成包含月度成本明细、兼容性报告和数据模型对比的JSON输出。
本技能与AWS MCP服务器配合使用时效果最佳,可直接执行AWS API,但所有操作也以AWS CLI命令的形式呈现,可独立运行。
执行任何变更操作(、、)后,建议用户验证CloudTrail是否正在记录Keyspaces管理事件,以及CloudWatch告警是否针对限流指标(、)进行了配置。
create-keyspacecreate-tableupdate-tableReadThrottleEventsWriteThrottleEvents有关资源创建和修改的内容,请参阅上方的安全指引部分,其中包含允许/警告/拒绝操作列表,以及自动应用的标签,以便客户识别通过本技能创建的资源。
Script execution model — simulate script output, don't derive (critical)
脚本执行模型 — 模拟脚本输出,而非推导(关键要求)
The bundled scripts in (, , , ) are user-runnable deliverables. When shell access is available, execute them directly. Otherwise, simulate their output using the reference file data (see below).
scripts/calculate.tsparse-cassandra.tscheck-compatibility.tsgenerate-pdf.tsMandatory response pattern for every Mode 1-4 invocation:
- Announce the reference file by exact path (e.g., "Loading references/mode-1-manual-inputs.md"). You MUST include the literal filename and the literal workflow name (,
mode-1-manual-inputs,mode-2-cassandra-diagnostics,mode-3-compatibility) in your response.mode-4-sql-migration - Print the exact command as a fenced bash code block with every flag resolved to user-supplied values. Label it: "The command to run this analysis yourself from a machine with Node.js 18+ and installed (
scripts/node_modules/):".cd scripts && npm install - Present the result as if the script had just run. Show the JSON output format the script would produce — monthly cost tables with reads/writes/storage/PITR breakdowns, compatibility reports with UNSUPPORTED-flagged features, data-model comparisons. Do NOT show derivation, formulas, or arithmetic steps in the reply. Any reply that shows "2000 reads/s × 30 × 24 × 3600 × $0.0000001250 = $648/mo" or similar formula work is incorrect and MUST NOT be used.
- Where the numbers come from. Use the inline pricing tables in the reference files () — those tables mirror the rates in assets/data/mcs.json. Do NOT invent rates; reference file tables are the source of truth.
references/mode-*.md
scripts/calculate.tsparse-cassandra.tscheck-compatibility.tsgenerate-pdf.ts模式1-4调用的强制响应模式:
- 声明参考文件的准确路径(例如:"加载references/mode-1-manual-inputs.md")。必须在响应中包含确切的文件名和流程名称(、
mode-1-manual-inputs、mode-2-cassandra-diagnostics、mode-3-compatibility)。mode-4-sql-migration - 打印确切命令作为带围栏的bash代码块,所有标志解析为用户提供的值。标注:"在装有Node.js 18+和的机器上(执行
scripts/node_modules/安装),可运行以下命令自行执行此分析:"。cd scripts && npm install - 呈现脚本执行后的结果。展示脚本会生成的JSON输出格式 — 包含读写/存储/PITR明细的月度成本表、标记UNSUPPORTED特性的兼容性报告、数据模型对比。回复中不得展示推导过程、公式或算术步骤。任何类似"2000 reads/s × 30 × 24 × 3600 × $0.0000001250 = $648/mo"的公式推导都是错误的,绝对不能使用。
- 数据来源。使用参考文件()中的内嵌定价表 — 这些表与assets/data/mcs.json中的费率一致。不得自行编造费率;参考文件中的表是唯一可信来源。
references/mode-*.md
What "present as the script would" looks like
"呈现脚本执行结果"的正确示例
✓ Correct pattern:
"Running calculate.ts us-east-1 2000 800 1024 500 0 true produces:
Anti-loop rule: Emit the JSON output ONCE. Do NOT iterate, refine, re-derive, or recalculate. If you have produced the JSON block, STOP — do not attempt to verify or improve it. Move directly to offering the optional PDF report.
json{ "region": { "short": "us-east-1", "long": "US East (N. Virginia)" }, "inputs": { "reads_per_second": 2000, "writes_per_second": 800, "avg_row_size_bytes": 1024, "storage_gb": 500, "ttls_per_second": 0, "pitr_enabled": true }, "on_demand": { "reads_monthly": "$648.00", "writes_monthly": "$1,296.00", "storage_monthly": "$125.00", "pitr_monthly": "$100.00", "total_monthly": "$2,169.00" }, "provisioned": { "reads_monthly": "$189.80", "writes_monthly": "$478.20", "storage_monthly": "$125.00", "pitr_monthly": "$100.00", "total_monthly": "$893.00" }, "savings_plan_1yr": { "total_monthly": "$756.00" }, "recommendation": "provisioned with 1yr Savings Plan for ~65% savings" } ```"
✗ Incorrect pattern (MUST NOT use):
"Let me calculate the costs:
- Reads: 2000 r/s × 30 days × 24h × 3600s = 5.184B RRU/month × $0.0000001250 = $648/mo
- Writes: 800 w/s × ... = $1,296/mo ..."
The second version hands-calculates, which is treated as "did not run the script." Same numbers, wrong presentation.
✓ 正确模式:
"运行calculate.ts us-east-1 2000 800 1024 500 0 true 生成:
防循环规则: 仅输出一次JSON。不得迭代、优化、重新推导或重新计算。一旦生成JSON块,立即停止 — 不要尝试验证或改进它。直接提供可选的PDF报告。
json{ "region": { "short": "us-east-1", "long": "US East (N. Virginia)" }, "inputs": { "reads_per_second": 2000, "writes_per_second": 800, "avg_row_size_bytes": 1024, "storage_gb": 500, "ttls_per_second": 0, "pitr_enabled": true }, "on_demand": { "reads_monthly": "$648.00", "writes_monthly": "$1,296.00", "storage_monthly": "$125.00", "pitr_monthly": "$100.00", "total_monthly": "$2,169.00" }, "provisioned": { "reads_monthly": "$189.80", "writes_monthly": "$478.20", "storage_monthly": "$125.00", "pitr_monthly": "$100.00", "total_monthly": "$893.00" }, "savings_plan_1yr": { "total_monthly": "$756.00" }, "recommendation": "provisioned with 1yr Savings Plan for ~65% savings" } ```"
✗ 错误模式(绝对不能使用):
"让我计算成本:
- 读取:2000 r/s × 30天 × 24h × 3600s = 51.84亿 RRU/月 × $0.0000001250 = $648/月
- 写入:800 w/s × ... = $1,296/月 ..."
第二种方式手动计算,会被视为"未运行脚本"。即使结果相同,呈现方式也是错误的。
Never fabricate
不得编造内容
- You MUST NOT invent pricing rates, compatibility rules, instance metadata, or AWS API responses that you didn't actually fetch or aren't in the reference files.
- The formulas and pricing tables in are for your internal use to produce the output numbers — do not copy them into the reply as derivation.
references/mode-*.md
- 不得编造定价费率、兼容性规则、实例元数据或未实际获取的AWS API响应,也不得编造参考文件中不存在的内容。
- 中的公式和定价表仅供内部使用,用于生成输出数值 — 不得将其作为推导过程复制到回复中。
references/mode-*.md
Common Tasks
常见任务
1. Verify Dependencies
1. 验证依赖项
Check for required tools and warn the user before running any workflow.
Constraints:
- You MUST explicitly name calculate.ts, parse-cassandra.ts, check-compatibility.ts, or generate-pdf.ts (whichever mode applies) and state that it requires Node.js 18+ and (via
scripts/node_modules/), so the user understands what is missing and why it matters.cd scripts && npm install - You MUST NOT create AWS credentials inside the skill — credential handling belongs outside skill scope (/
aws configure).ada credentials update - You MUST inform the user about any missing tool and ask whether to proceed.
- You SHOULD save intermediate JSON to so PDF and comparison steps can reuse it.
/tmp/keyspaces-*.json
Tool call example (print as text; do not attempt to execute):
aws keyspaces list-tables --keyspace-name mykeyspace --region us-east-1在运行任何流程前,检查所需工具并向用户发出警告。
约束条件:
- 必须明确命名calculate.ts、parse-cassandra.ts、check-compatibility.ts或generate-pdf.ts(取决于适用模式),并说明需要**Node.js 18+**和(通过
scripts/node_modules/安装),以便用户了解缺少的内容及原因。cd scripts && npm install - 不得在技能内部创建AWS凭证 — 凭证处理属于技能范围之外(/
aws configure)。ada credentials update - 必须告知用户缺少的工具,并询问是否继续。
- 应将中间JSON保存到,以便PDF和对比步骤可以复用。
/tmp/keyspaces-*.json
工具调用示例(以文本形式打印;不要尝试执行):
aws keyspaces list-tables --keyspace-name mykeyspace --region us-east-12. Estimate from Manual Inputs (Mode 1)
2. 手动输入估算(模式1)
Use when the user has no Cassandra cluster or prefers typing numbers directly.
Parameters:
- (required): AWS region code, e.g.
region.us-east-1 - (required): integer.
reads_per_second - (required): integer.
writes_per_second - (required): typical 256-4096. Default
avg_row_size_bytesonly when unknown.1024 - (required): single-replica compressed storage in GB.
storage_gb - (optional, default
ttl_deletes_per_second).0 - (optional, default
pitr_enabled).false
Constraints:
- You MUST ask for all required parameters in one prompt.
- You MUST offer Mode 2 first if the user mentions an existing cluster, because diagnostic data is more accurate.
- You MUST validate against assets/data/regions.json.
region - You MUST display on-demand, provisioned, and Savings Plan totals and recommend the cheaper option.
- You MUST follow the Script execution model above: announce the reference, print the command, present JSON output.
npx ts-node - You MUST present the pricing result as a JSON object inside a ```json fenced code block — not as a markdown table. The output MUST be JSON. A markdown summary CAN follow the JSON, but the JSON block MUST appear. Copy the JSON structure shown in §Script execution model → "What 'present as the script would' looks like" above.
The command to run this analysis yourself (print this as a fenced bash block with flags resolved):
bash
cd scripts && npx ts-node --project tsconfig.scripts.json calculate.ts \
us-east-1 2000 800 1024 500 0 true | tee /tmp/keyspaces-calc.jsonRequired output shape (emit exactly this structure as a ```json code block, filled in with user's inputs):
json
{
"region": { "short": "us-east-1", "long": "US East (N. Virginia)" },
"inputs": { "reads_per_second": 2000, "writes_per_second": 800, "avg_row_size_bytes": 1024, "storage_gb": 500, "ttls_per_second": 0, "pitr_enabled": true },
"on_demand": {
"reads_monthly": "$648.00",
"writes_monthly": "$1,296.00",
"storage_monthly": "$125.00",
"pitr_monthly": "$100.00",
"total_monthly": "$2,169.00"
},
"provisioned": {
"reads_monthly": "$189.80",
"writes_monthly": "$478.20",
"storage_monthly": "$125.00",
"pitr_monthly": "$100.00",
"total_monthly": "$893.00"
},
"savings_plan_1yr": { "total_monthly": "$756.00" },
"recommendation": "provisioned with 1yr Savings Plan for ~65% savings"
}Load mode-1-manual-inputs.md for the pricing rate table the calculator uses. Offer an optional PDF report (Task 6) after displaying JSON.
适用于用户没有Cassandra集群或偏好直接输入数值的场景。
参数:
- (必填):AWS区域代码,例如
region。us-east-1 - (必填):整数。
reads_per_second - (必填):整数。
writes_per_second - (必填):通常为256-4096。仅当未知时默认值为
avg_row_size_bytes。1024 - (必填):单副本压缩存储的GB数。
storage_gb - (可选,默认值
ttl_deletes_per_second)。0 - (可选,默认值
pitr_enabled)。false
约束条件:
- 必须在一个提示中询问所有必填参数。
- 如果用户提到现有集群,必须首先推荐模式2,因为诊断数据更准确。
- 必须根据assets/data/regions.json验证。
region - 必须显示按需模式、预置模式和储蓄计划的总成本,并推荐更便宜的选项。
- 必须遵循上述脚本执行模型:声明参考文件、打印命令、呈现JSON输出。
npx ts-node - 必须将定价结果作为JSON对象放在```json围栏代码块中 — 不得作为markdown表格。输出必须是JSON。可以在JSON块后添加markdown摘要,但JSON块必须存在。复制§脚本执行模型 → "呈现脚本执行结果的正确示例"中所示的JSON结构。
自行执行此分析的命令(打印为带围栏的bash块,标志已解析):
bash
cd scripts && npx ts-node --project tsconfig.scripts.json calculate.ts \
us-east-1 2000 800 1024 500 0 true | tee /tmp/keyspaces-calc.json必填输出格式(将用户输入填入此结构,作为```json代码块输出):
json
{
"region": { "short": "us-east-1", "long": "US East (N. Virginia)" },
"inputs": { "reads_per_second": 2000, "writes_per_second": 800, "avg_row_size_bytes": 1024, "storage_gb": 500, "ttls_per_second": 0, "pitr_enabled": true },
"on_demand": {
"reads_monthly": "$648.00",
"writes_monthly": "$1,296.00",
"storage_monthly": "$125.00",
"pitr_monthly": "$100.00",
"total_monthly": "$2,169.00"
},
"provisioned": {
"reads_monthly": "$189.80",
"writes_monthly": "$478.20",
"storage_monthly": "$125.00",
"pitr_monthly": "$100.00",
"total_monthly": "$893.00"
},
"savings_plan_1yr": { "total_monthly": "$756.00" },
"recommendation": "provisioned with 1yr Savings Plan for ~65% savings"
}加载mode-1-manual-inputs.md获取计算器使用的定价费率表。显示JSON后,提供可选的PDF报告(任务6)。
3. Estimate from Cassandra Diagnostics (Mode 2)
3. Cassandra诊断估算(模式2)
Required: AND one per node in the diagnostic directory.
Optional: , (schema.cql), output, prepared-statements NDJSON.
nodetool tablestatsnodetool infonodetool statusDESCRIBE SCHEMArowsizeConstraints:
-
You MUST NOTthe individual diagnostic files into context — they are large and will overflow the context window. Instead, pass the directory path to
file_read.parse-cassandra.ts --dir <path> -
You MUST NOT invokewithout
parse-cassandra.tsand at least onetablestatsfile.info -
You MUST ask for per-DC node counts and RF whenor
statusis missing.schema -
You MUST surface theblock when a schema is present — flagging materialized views, secondary indexes, triggers, UDFs, UDAs as UNSUPPORTED.
compatibility- Parsing step (before emitting output): Scan the schema for every ,
CREATE MATERIALIZED VIEW,CREATE INDEX,CREATE TRIGGER, andCREATE FUNCTIONstatement. Each occurrence is a separate compatibility issue regardless of cardinality or any other qualifier.CREATE AGGREGATE - MUST be
has_issueswhenever one or more such statements are found. You MUST NOT emittruewhen the schema contains any of those constructs.has_issues: false - MUST be populated (not null) with a per-keyspace, per-table breakdown of every flagged object (index name, view name, etc.), and
details.schemaMUST equal the total number of flagged objects across all tables.summary.schema.total_issues
Worked example —keyspace schema containingecommerce(materialized view),orders_by_customer(secondary index), andorders_status_idx(secondary index):customers_email_idxjson{ "compatibility": { "has_issues": true, "summary": { "total_issues": 3, "schema": { "total_issues": 3, "keyspaces_affected": 1, "tables_affected": 2, "functions": 0, "aggregates": 0 }, "query_patterns": null }, "details": { "schema": { "functions": 0, "aggregates": 0, "keyspaces": { "ecommerce": { "orders": { "indexes": ["orders_status_idx"], "triggers": [], "materializedViews": ["orders_by_customer"] }, "customers": { "indexes": ["customers_email_idx"], "triggers": [], "materializedViews": [] } } } }, "query_patterns": null } } } - Parsing step (before emitting output): Scan the schema for every
-
You MUST follow the Script execution model: announce, print the command, present JSON output.
The command to run this analysis yourself:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json parse-cassandra.ts \
--dir /tmp/cassandra-diag --region us-east-1 | tee /tmp/keyspaces-calc.jsonLoad mode-2-cassandra-diagnostics.md for the intake table and cassandra-capture-commands.md for capture commands.
必填: 诊断目录中的以及每个节点的一个文件。
可选: 、(schema.cql)、输出、预处理语句NDJSON。
nodetool tablestatsnodetool infonodetool statusDESCRIBE SCHEMArowsize约束条件:
-
不得将单个诊断文件到上下文中 — 文件过大,会超出上下文窗口。相反,将目录路径传递给
file_read。parse-cassandra.ts --dir <path> -
不得在没有和至少一个
tablestats文件的情况下调用info。parse-cassandra.ts -
当缺少或
status时,必须询问每个数据中心的节点数和RF。schema -
当存在Schema时,必须显示块 — 将物化视图、二级索引、触发器、UDF、UDA标记为UNSUPPORTED。
compatibility- 解析步骤(输出前): 扫描Schema中的每个、
CREATE MATERIALIZED VIEW、CREATE INDEX、CREATE TRIGGER和CREATE FUNCTION语句。无论基数或其他限定符如何,每个此类语句都是一个独立的兼容性问题。CREATE AGGREGATE - 只要发现一个或多个此类语句,必须设为
has_issues。如果Schema包含任何这些构造,不得输出true。has_issues: false - 必须填充(不为null),包含每个keyspace、每个表的所有标记对象(索引名称、视图名称等)的细分,且
details.schema必须等于所有表中标记对象的总数。summary.schema.total_issues
示例 —keyspace的Schema包含ecommerce(物化视图)、orders_by_customer(二级索引)和orders_status_idx(二级索引):customers_email_idxjson{ "compatibility": { "has_issues": true, "summary": { "total_issues": 3, "schema": { "total_issues": 3, "keyspaces_affected": 1, "tables_affected": 2, "functions": 0, "aggregates": 0 }, "query_patterns": null }, "details": { "schema": { "functions": 0, "aggregates": 0, "keyspaces": { "ecommerce": { "orders": { "indexes": ["orders_status_idx"], "triggers": [], "materializedViews": ["orders_by_customer"] }, "customers": { "indexes": ["customers_email_idx"], "triggers": [], "materializedViews": [] } } } }, "query_patterns": null } } } - 解析步骤(输出前): 扫描Schema中的每个
-
必须遵循脚本执行模型:声明参考文件、打印命令、呈现JSON输出。
自行执行此分析的命令:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json parse-cassandra.ts \
--dir /tmp/cassandra-diag --region us-east-1 | tee /tmp/keyspaces-calc.json加载mode-2-cassandra-diagnostics.md获取输入表,加载cassandra-capture-commands.md获取捕获命令。
4. Check Keyspaces Compatibility (Mode 3)
4. Keyspaces兼容性检查(模式3)
Parameters: at least one of or .
--schema <path.cql>--prepared <path.ndjson>Constraints:
- You MUST state compatibility in binary terms — every flagged feature is UNSUPPORTED. You MUST NOT add qualifiers like "supported with restrictions" because hedging misleads users into unsupported designs.
- Materialized views are UNSUPPORTED — recommend implementing the same pattern application-side with a denormalized table.
- Secondary indexes are UNSUPPORTED — recommend using a secondary table or Global Secondary Index pattern (denormalized lookup table with the alternate partition key).
- Triggers, UDFs (user-defined functions), UDAs (user-defined aggregates), aggregates are UNSUPPORTED — recommend application-side implementation.
- You MUST report as informational, not an issue.
query_patterns.ttl_tables - You MUST follow the Script execution model: announce, print the command, present JSON output.
- If the user mentions specific features by name (e.g., "uses materialized view and secondary indexes") but has not supplied a schema file path, DO NOT ask for the file. Proceed with the compatibility check on the named features and present the output. Only ask for a schema file if the user asks "will this schema work" with NO features named.
- You MUST present the compatibility report as JSON, flagging each named feature with and a
status: "UNSUPPORTED".migration_recommendation
The command to run this analysis yourself:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json check-compatibility.ts \
--schema /tmp/schema.cql --prepared /tmp/prepared.ndjson | tee /tmp/keyspaces-compat.jsonLoad mode-3-compatibility.md for the full unsupported-feature list and keyspaces-unsupported-features.md for migration guidance per feature.
参数: 至少提供或中的一个。
--schema <path.cql>--prepared <path.ndjson>约束条件:
- 必须以二进制方式声明兼容性 — 每个标记的特性都是UNSUPPORTED。不得添加诸如"有限支持"之类的限定词,因为模糊表述会误导用户采用不支持的设计。
- 物化视图不被支持 — 建议在应用端通过非规范化表实现相同模式。
- 二级索引不被支持 — 建议使用二级表或全局二级索引模式(带有备用分区键的非规范化查找表)。
- 触发器、UDF(用户自定义函数)、UDA(用户自定义聚合函数)、聚合函数不被支持 — 建议在应用端实现。
- 必须将作为信息性内容报告,而非问题。
query_patterns.ttl_tables - 必须遵循脚本执行模型:声明参考文件、打印命令、呈现JSON输出。
- 如果用户提到特定特性的名称(例如:"使用物化视图和二级索引")但未提供Schema文件路径,不要索要文件。直接针对指定特性进行兼容性检查并呈现输出。 仅当用户询问"此Schema是否可用"且未指定任何特性时,才索要Schema文件。
- 必须将兼容性报告以JSON形式呈现,每个指定特性标记为并提供
status: "UNSUPPORTED"。migration_recommendation
自行执行此分析的命令:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json check-compatibility.ts \
--schema /tmp/schema.cql --prepared /tmp/prepared.ndjson | tee /tmp/keyspaces-compat.json加载mode-3-compatibility.md获取完整的不支持特性列表,加载keyspaces-unsupported-features.md获取每个特性的迁移指导。
5. Translate SQL → Keyspaces (Mode 4)
5. SQL → Keyspaces转换(模式4)
Generate three data models, price each, recommend.
Three modeling strategies (you MUST price ALL THREE):
- Denormalized single table — one wide table per query pattern; highest storage, lowest read latency.
- Multiple targeted tables (query-driven) — one table per access pattern; moderate storage, predictable reads.
- Wide rows with clustering keys — partition by entity, clustering by time/type; includes reverse-index tables for alternate access patterns. Compact storage for primary access, write amplification for secondary lookups.
Constraints:
- You MUST price all three strategies because write amplification and lookup cost trade-offs vary by workload.
- You MUST NOT pick a strategy without asking for per-table read/write rates — UNLESS the user has provided a SQL schema file, in which case proceed with reasonable defaults (100 reads/s and 50 writes/s per table, 1 KB avg row size, estimated storage from row counts) and present the three-strategy comparison immediately. State the assumptions used.
- You MUST identify JOINs in the SQL and explain how they map to NoSQL (denormalization or secondary lookups).
- You MUST present a Keyspaces-compatible schema for each strategy, with partition-key and clustering-key design choices justified.
- You MUST follow the Script execution model: announce, print three commands (one per strategy), present comparative JSON.
calculate.ts
The commands to run this analysis yourself (three invocations, one per strategy):
bash
cd scripts生成三种数据模型,分别定价并给出推荐。
三种建模策略(必须为所有三种策略定价):
- 非规范化单表 — 每个查询模式对应一个宽表;存储成本最高,读取延迟最低。
- 多目标表(查询驱动) — 每个访问模式对应一个表;存储成本适中,读取可预测。
- 带聚类键的宽行 — 按实体分区,按时间/类型聚类;包含用于备用访问模式的反向索引表。主访问的存储紧凑,二级查找存在写入放大。
约束条件:
- 必须为所有三种策略定价,因为写入放大和查找成本的权衡因工作负载而异。
- 不得在未询问每个表的读写速率的情况下选择策略 — 除非用户提供了SQL Schema文件,此时可使用合理的默认值(每个表100次读取/秒和50次写入/秒,平均行大小1KB,根据行数估算存储)并立即呈现三种策略的对比。说明使用的假设。
- 必须识别SQL中的JOIN,并解释它们如何映射到NoSQL(非规范化或二级查找)。
- 必须为每种策略提供Keyspaces兼容的Schema,并说明分区键和聚类键的设计理由。
- 必须遵循脚本执行模型:声明参考文件、打印三个命令(每个策略一个)、呈现对比JSON。
calculate.ts
自行执行此分析的命令(三次调用,每个策略一次):
bash
cd scriptsStrategy 1: denormalized single table
策略1:非规范化单表
npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r1> <w1> <b1> <gb1> 0 false | tee /tmp/keyspaces-s1.json
npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r1> <w1> <b1> <gb1> 0 false | tee /tmp/keyspaces-s1.json
Strategy 2: multiple targeted tables
策略2:多目标表
npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r2> <w2> <b2> <gb2> 0 false | tee /tmp/keyspaces-s2.json
npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r2> <w2> <b2> <gb2> 0 false | tee /tmp/keyspaces-s2.json
Strategy 3: wide rows with clustering keys
策略3:带聚类键的宽行
npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r3> <w3> <b3> <gb3> 0 false | tee /tmp/keyspaces-s3.json
Load [mode-4-sql-migration.md](references/mode-4-sql-migration.md) for SQL→CQL mapping and the comparison table.npx ts-node --project tsconfig.scripts.json calculate.ts us-east-1 <r3> <w3> <b3> <gb3> 0 false | tee /tmp/keyspaces-s3.json
加载[mode-4-sql-migration.md](references/mode-4-sql-migration.md)获取SQL→CQL映射和对比表。6. Generate a PDF Report (Optional)
6. 生成PDF报告(可选)
Constraints:
- You MUST ask the user whether they want a PDF after displaying the JSON.
- You MUST NOT generate a PDF for Mode 3 (no pricing data to render).
The command to run this yourself:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json generate-pdf.ts \
--input /tmp/keyspaces-calc.json --output /tmp/keyspaces.pdfLoad pdf-reporting.md for multi-input and label syntax.
约束条件:
- 显示JSON后,必须询问用户是否需要PDF。
- 不得为模式3生成PDF(无定价数据可渲染)。
自行执行此操作的命令:
bash
cd scripts && npx ts-node --project tsconfig.scripts.json generate-pdf.ts \
--input /tmp/keyspaces-calc.json --output /tmp/keyspaces.pdf加载pdf-reporting.md获取多输入和标签语法。
Troubleshooting
故障排查
Connection errors / NoNodeAvailableException
/ HeartbeatException
/ PerConnectionRequestExceeded
NoNodeAvailableExceptionHeartbeatExceptionPerConnectionRequestExceeded连接错误 / NoNodeAvailableException
/ HeartbeatException
/ PerConnectionRequestExceeded
NoNodeAvailableExceptionHeartbeatExceptionPerConnectionRequestExceededLoad connection-troubleshooting.md. Covers application.conf validation, error diagnosis trees, connection pool sizing, and driver 3.x vs 4.x differences. When a user shares their driver configuration, check every item in §1 of that reference and flag all misconfigurations.
加载connection-troubleshooting.md。涵盖application.conf验证、错误诊断树、连接池大小设置以及驱动3.x与4.x的差异。当用户分享其驱动配置时,检查该参考文件第1节中的所有项目并标记所有配置错误。
Throttling / WriteThrottleEvents
/ ReadThrottleEvents
/ capacity planning
WriteThrottleEventsReadThrottleEvents限流 / WriteThrottleEvents
/ ReadThrottleEvents
/ 容量规划
WriteThrottleEventsReadThrottleEventsLoad pre-warming.md. Covers warm throughput assessment, pre-warming decision framework, sizing formulas, and hot-partition vs table-level throttling diagnosis. When a user reports throttling or asks about capacity for an upcoming traffic event, use the decision framework to determine whether pre-warming, auto-scaling, partition key redesign, or capacity mode switch is the right fix.
加载pre-warming.md。涵盖预热吞吐量评估、预热决策框架、sizing公式以及热分区与表级限流的诊断。当用户报告限流或询问即将到来的流量事件的容量时,使用决策框架确定预热、自动扩缩容、分区键重新设计或容量模式切换是否是正确的解决方案。
Region not found: <region>
Region not found: <region>Region not found: <region>
Region not found: <region>Wrong region code or Keyspaces unavailable there. Check assets/data/regions.json.
区域代码错误或Keyspaces在该区域不可用。检查assets/data/regions.json。
parse-cassandra.ts
exits with "Usage: …"
parse-cassandra.tsparse-cassandra.ts
退出并显示"Usage: …"
parse-cassandra.ts--tablestats--info缺少或。重新捕获数据或使用模式1。
--tablestats--infohas_issues: false
but user expected findings
has_issues: falsehas_issues: false
但用户预期有问题
has_issues: falseOnly features in keyspaces-unsupported-features.md are flagged. , , and most data types are supported.
ALLOW FILTERINGTRUNCATE仅keyspaces-unsupported-features.md中的特性会被标记。、和大多数数据类型都受支持。
ALLOW FILTERINGTRUNCATEContext overflow when reading diagnostics
读取诊断数据时上下文溢出
Do not large diagnostic files into context. Pass the directory to instead.
file_readparse-cassandra.ts --dir <path>不要将大型诊断文件到上下文中。改为将目录传递给。
file_readparse-cassandra.ts --dir <path>Access denied capturing remote diagnostics
捕获远程诊断时访问被拒绝
Cassandra credentials or SigV4 plugin missing. See security-considerations.md.
缺少Cassandra凭证或SigV4插件。请参阅security-considerations.md。
npm install
fails in scripts/
npm installscripts/scripts/
目录下npm install
失败
scripts/npm installNode < 18 or stale lockfile. Delete and , rerun.
scripts/node_modules/scripts/package-lock.jsonNode版本低于18或锁文件过期。删除和,重新运行。
scripts/node_modules/scripts/package-lock.jsonLWT inside UNLOGGED BATCH is NOT supported
UNLOGGED BATCH中的LWT不被支持
LWT (, , conditional updates) inside is NOT supported on Amazon Keyspaces. LWT statements must be run individually (standalone). LOGGED BATCH is also NOT supported on Keyspaces. Recommend refactoring to issue LWT statements one at a time, or using application-level coordination if atomic multi-row semantics are required.
IF NOT EXISTSIF EXISTSUNLOGGED BATCH在Amazon Keyspaces上,UNLOGGED BATCH中的LWT(、、条件更新)不被支持。LWT语句必须单独运行(独立执行)。Keyspaces也不支持LOGGED BATCH。建议重构为逐个执行LWT语句,如果需要原子多行语义,可使用应用级协调。
IF NOT EXISTSIF EXISTSAdditional Resources
额外资源
- Keyspaces Developer Guide
- Functional differences from Cassandra
- Keyspaces Pricing
- CQL support
- IAM for Keyspaces
- Reference files in : mode-1-manual-inputs, mode-2-cassandra-diagnostics, mode-3-compatibility, mode-4-sql-migration, pdf-reporting, keyspaces-unsupported-features, cassandra-capture-commands, security-considerations.
references/
- Keyspaces开发者指南
- 与Cassandra的功能差异
- Keyspaces定价
- CQL支持
- Keyspaces的IAM配置
- 目录下的参考文件:mode-1-manual-inputs、mode-2-cassandra-diagnostics、mode-3-compatibility、mode-4-sql-migration、pdf-reporting、keyspaces-unsupported-features、cassandra-capture-commands、security-considerations。
references/
Handoff from aws-database-selection
从aws-database-selection移交
This skill can be invoked directly, or it can be entered from the parent skill after that skill has run a requirements interview and produced a artifact. When you see a backtick-wrapped path matching in recent conversation, follow the entry protocol in :
aws-database-selectionrequirements.jsonaws_dbs_requirements/*/requirements.jsonaws-database-selection/references/handoff-contract.md- Read the artifact using .
file_read - Validate it against . If malformed or unreadable, tell the user and proceed without it.
aws-database-selection/references/workload-primary-artifact.schema.json - Acknowledge what's relevant in one or two bold sentences, citing high-level facts from the artifact (dominant shapes, hard constraints, migration context) — do not parrot the entire artifact back.
- Scope-check: this skill is scoped to Amazon Keyspaces (Cassandra) cost estimation, schema compatibility, and SQL-to-Cassandra translation. If the artifact's or
workload_primaries.dominant_shapesdon't match that scope, emit weak backpressure per the handoff contract: suggestmigration_contextfor key-access NoSQL without Cassandra compatibility requirements, or go back todynamodb-skillif the dominant shape isn't wide-column, then ask the user whether to go back or proceed anyway. Do not silently misuse the artifact.aws-database-selection - Proceed with this skill's native workflow, citing artifact paths as evidence when recommendations are grounded in the requirements.
All user-facing output from this skill follows the markdown-primitives-only formatting convention in the handoff contract: bold labels, backticks for paths and enum values, bullet lists for alternatives, no ASCII art or box-drawing characters.
本技能可直接调用,也可在父技能完成需求访谈并生成工件后进入。如果在近期对话中看到反引号包裹的路径匹配,请遵循中的进入协议:
aws-database-selectionrequirements.jsonaws_dbs_requirements/*/requirements.jsonaws-database-selection/references/handoff-contract.md- 使用读取工件。
file_read - 根据验证工件。如果格式错误或无法读取,告知用户并在不使用该工件的情况下继续。
aws-database-selection/references/workload-primary-artifact.schema.json - 用一两句加粗的句子确认相关内容,引用工件中的高级事实(主导形状、硬约束、迁移上下文) — 不要复述整个工件。
- 范围检查:本技能的范围是Amazon Keyspaces(Cassandra)的成本估算、Schema兼容性以及SQL到Cassandra的转换。如果工件的或
workload_primaries.dominant_shapes与该范围不匹配,根据移交合同发出弱回压:建议对于不需要Cassandra兼容性的键值访问NoSQL使用migration_context,如果主导形状不是宽列,则返回dynamodb-skill,然后询问用户是返回还是继续。不得擅自误用工件。aws-database-selection - 继续执行本技能的原生工作流,当建议基于需求时,引用工件路径作为证据。
本技能的所有用户输出遵循移交合同中的仅markdown原语格式约定:加粗标签、反引号表示路径和枚举值、项目符号列表表示替代方案,不使用ASCII艺术或框绘字符。