Guide · Amazon Keyspaces · Capacity Management · MCP Server Operations

Amazon Keyspaces Capacity Modes and Operations for MCP Servers

Amazon Keyspaces offers two throughput modes — on-demand (pay-per-request) and provisioned (reserved RCU/WCU) — with fundamentally different cost profiles that suit different MCP server workload shapes. On top of throughput, Keyspaces provides operational features that matter for production MCP deployments: point-in-time recovery (PITR) for restoring to any second in the last 35 days, on-demand backups for snapshots before migrations, CloudWatch metrics for capacity planning, and IAM resource policies for multi-team access control. This guide covers how to choose the right mode, how to switch between them, how to monitor and alert on capacity usage, and how to operate PITR and backups.

TL;DR

Use on-demand (PAY_PER_REQUEST) for MCP servers in development, variable-traffic production, or when you cannot predict peak throughput — it is 2–5x more expensive per read/write than provisioned at sustained load but requires zero capacity planning. Use provisioned (PROVISIONED) for steady-traffic MCP tools once you know the RCU/WCU floor from CloudWatch metrics. Enable PITR from day one — it costs ~20% of your table storage. You can switch between modes at most once every 30 seconds per table (rate-limit enforced). CloudWatch metric ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits tell you actual throughput; use them to set provisioned targets or trigger auto-scaling policies.

On-demand vs provisioned — when to use each

CharacteristicOn-demand (PAY_PER_REQUEST)Provisioned
Cost modelPer-read + per-write; no idle cost beyond storageReserved RCU/WCU per second, billed whether used or not
Burst capacityInstant — absorbs any load up to service limitsUp to 2x provisioned capacity briefly (burst); throttled beyond that
Cost at sustained high throughput2–5x more expensive than equivalent provisioned capacityPredictable; cheapest at high utilization (≥60%)
Cost at low utilizationCheap — only pay for actual reads/writesWasteful — paying for unused reserved capacity
Capacity planning requiredNoYes — set based on P99 throughput from CloudWatch
Throttling behaviorNo throttling (up to service quotas)Throttled when exceeding provisioned + burst capacity
Right for MCP serversDev/test; variable-traffic agents; event-driven toolsSteady-traffic production tools with predictable load

Start on-demand. After 2 weeks of production traffic, check CloudWatch for the P95 and P99 of ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits. If utilization is steady (variance < 3x between P50 and P99), switch to provisioned at 1.2x the P99 value.

Setting capacity mode at table creation

import { CreateTableCommand, ThroughputMode } from '@aws-sdk/client-keyspaces';

// On-demand: PAY_PER_REQUEST
await ksClient.send(new CreateTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
  schemaDefinition: { /* ... */ },
  capacitySpecification: {
    throughputMode: ThroughputMode.PAY_PER_REQUEST,
  },
}));

// Provisioned: explicit RCU/WCU
await ksClient.send(new CreateTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations_prod',
  schemaDefinition: { /* ... */ },
  capacitySpecification: {
    throughputMode: ThroughputMode.PROVISIONED,
    readCapacityUnits: 100,   // RCU: one strongly-consistent 4KB read per second
    writeCapacityUnits: 50,   // WCU: one 1KB write per second
  },
}));

Capacity units for Keyspaces:

Switching capacity modes and updating provisioned capacity

Use UpdateTableCommand to change capacity mode or adjust provisioned throughput. Switching modes is rate-limited to one change per table every 30 seconds and one mode switch per table per day (not unlimited):

import { UpdateTableCommand, ThroughputMode } from '@aws-sdk/client-keyspaces';

// Switch from on-demand to provisioned
await ksClient.send(new UpdateTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
  capacitySpecification: {
    throughputMode: ThroughputMode.PROVISIONED,
    readCapacityUnits: 150,
    writeCapacityUnits: 75,
  },
}));

// Update provisioned throughput (without changing mode)
await ksClient.send(new UpdateTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
  capacitySpecification: {
    throughputMode: ThroughputMode.PROVISIONED,
    readCapacityUnits: 300,   // scale up for a known spike (pre-announcement traffic)
    writeCapacityUnits: 150,
  },
}));

Switch back to on-demand before high-uncertainty traffic events (product launches, MCP tool announcements), then switch to provisioned after steady-state metrics establish themselves.

CloudWatch metrics for capacity monitoring

Keyspaces publishes the following CloudWatch metrics under the AWS/Cassandra namespace. Use these to right-size provisioned capacity and set alarms before throttling impacts MCP tool users.

MetricWhat it measuresUse for
ConsumedReadCapacityUnitsRCU consumed per second (sum)Setting provisioned RCU target; detecting read spikes
ConsumedWriteCapacityUnitsWCU consumed per second (sum)Setting provisioned WCU target; detecting write spikes
ProvisionedReadCapacityUnitsRCU currently provisionedVerifying UpdateTableCommand applied
ProvisionedWriteCapacityUnitsWCU currently provisionedVerifying UpdateTableCommand applied
ReadThrottleEventsRead requests throttled due to exceeding provisioned RCUAlert when > 0 sustained for > 1 minute — indicates under-provisioning
WriteThrottleEventsWrite requests throttled due to exceeding provisioned WCUAlert when > 0 sustained for > 1 minute
UserErrorsCQL errors (invalid query, type mismatch, etc.)Alert on sustained non-zero — indicates driver or schema bugs
SystemErrorsService-side errorsAlert on any non-zero — indicates Keyspaces service issues
BillableTableSizeInBytesBilled storage bytes for the tableMonitor growth; set billing alarm

Create alarms via CDK or CloudFormation:

// CloudFormation resource for a throttle alarm
{
  "Type": "AWS::CloudWatch::Alarm",
  "Properties": {
    "AlarmName": "keyspaces-write-throttle-mcp-prod",
    "Namespace": "AWS/Cassandra",
    "MetricName": "WriteThrottleEvents",
    "Dimensions": [
      { "Name": "Keyspace", "Value": "mcp_server" },
      { "Name": "TableName", "Value": "tool_invocations" }
    ],
    "Statistic": "Sum",
    "Period": 60,
    "EvaluationPeriods": 2,
    "Threshold": 1,
    "ComparisonOperator": "GreaterThanOrEqualToThreshold",
    "AlarmActions": ["arn:aws:sns:us-east-1:123456789012:ops-alerts"],
    "TreatMissingData": "notBreaching"
  }
}

Point-in-time recovery (PITR)

PITR continuously backs up your Keyspaces table, allowing restore to any second within the last 35 days. It is the primary recovery mechanism for accidental data deletion, bad deployments, and data corruption from MCP tool bugs.

import {
  UpdateTableCommand,
  RestoreTableToPointInTimeCommand,
  GetTableCommand,
} from '@aws-sdk/client-keyspaces';

// Enable PITR on an existing table
await ksClient.send(new UpdateTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
  pointInTimeRecovery: { status: 'ENABLED' },
}));

// Restore to a specific point in time (creates a new table)
await ksClient.send(new RestoreTableToPointInTimeCommand({
  sourceKeyspaceName: 'mcp_server',
  sourceTableName: 'tool_invocations',
  targetKeyspaceName: 'mcp_server',
  targetTableName: 'tool_invocations_restored_20261113',
  restoreTimestamp: new Date('2026-11-13T08:00:00Z'),  // must be within last 35 days
  pointInTimeRecovery: { status: 'ENABLED' },
  capacitySpecificationOverride: {
    throughputMode: 'PAY_PER_REQUEST',  // start on on-demand while verifying restore
  },
}));

// Poll until restored table is ACTIVE
await waitForTable('mcp_server', 'tool_invocations_restored_20261113');

Important PITR operational notes:

// Find the latest restorable timestamp for a table
const { table } = await ksClient.send(new GetTableCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
}));
const latestRestore = table?.pointInTimeRecovery?.latestRestorableTimestamp;
console.log(`Can restore up to: ${latestRestore?.toISOString()}`);

On-demand backups — snapshots before migrations

On-demand backups are table snapshots taken immediately, retained indefinitely until deleted. Use them before schema changes, MCP server deploys that modify data, and data migrations.

import {
  CreateBackupCommand,
  ListBackupsCommand,
  RestoreTableFromBackupCommand,
  DeleteBackupCommand,
} from '@aws-sdk/client-keyspaces';

// Create a backup before a migration
const { backupSummary } = await ksClient.send(new CreateBackupCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
  backupName: 'pre-schema-migration-20261113',
  tags: [{ key: 'created-by', value: 'mcp-deploy-script' }],
}));
const backupArn = backupSummary?.backupArn;

// List all backups for a table
const { backups } = await ksClient.send(new ListBackupsCommand({
  keyspaceName: 'mcp_server',
  tableName: 'tool_invocations',
}));

// Restore from an on-demand backup (creates a new table)
await ksClient.send(new RestoreTableFromBackupCommand({
  targetKeyspaceName: 'mcp_server',
  targetTableName: 'tool_invocations_from_backup',
  backupArn: backupArn!,
}));

// Delete backup when no longer needed (backups are billed at ~$0.10/GB/month)
await ksClient.send(new DeleteBackupCommand({ backupArn: backupArn! }));

IAM policies for Keyspaces operations

Keyspaces IAM uses resource ARNs of the form arn:aws:cassandra:REGION:ACCOUNT:/keyspace/NAME/table/NAME. Separate management-plane and data-plane permissions:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "KeyspacesManagementReadOnly",
      "Effect": "Allow",
      "Action": [
        "cassandra:Create",
        "cassandra:Drop",
        "cassandra:Alter",
        "cassandra:Restore"
      ],
      "Resource": [
        "arn:aws:cassandra:us-east-1:123456789012:/keyspace/mcp_server/*"
      ]
    },
    {
      "Sid": "KeyspacesDataAccess",
      "Effect": "Allow",
      "Action": [
        "cassandra:Select",
        "cassandra:Modify"
      ],
      "Resource": [
        "arn:aws:cassandra:us-east-1:123456789012:/keyspace/mcp_server/table/tool_invocations",
        "arn:aws:cassandra:us-east-1:123456789012:/keyspace/system*/table/*"
      ]
    },
    {
      "Sid": "KeyspacesBackupRestore",
      "Effect": "Allow",
      "Action": [
        "cassandra:Create",
        "cassandra:Restore",
        "cassandra:Drop"
      ],
      "Resource": "arn:aws:cassandra:us-east-1:123456789012:/keyspace/*/table/*/backup/*"
    }
  ]
}

For least-privilege, give MCP tool Lambda functions only cassandra:Select and cassandra:Modify on specific tables. Reserve cassandra:Create, cassandra:Drop, and cassandra:Alter for the deployment/migration IAM role, not the runtime role.

Service quotas and limits

LimitDefaultNotes
Max tables per keyspace256Requestable increase via Service Quotas
Max keyspaces per account per region256Requestable increase
Max partition size10 GB (soft guideline)No hard limit; larger partitions slow reads and compaction
Max row size1 MBHard limit — rows exceeding 1 MB are rejected
Max columns per table225Fixed — design wide tables carefully
On-demand throughput limit40,000 RCU and 40,000 WCU per second per tableRequestable increase; applies to on-demand mode
Provisioned throughput limit40,000 RCU and 40,000 WCU per second per tableRequestable increase
Max backups per table35Fixed; delete old backups before creating new ones
Capacity mode switches per table per day4 times per dayRate-limited — plan mode switches carefully

For MCP server tools with high read amplification (many tool calls per session each issuing Keyspaces queries), the default 40,000 RCU/second per table is usually not a constraint. If you approach it, consider splitting the table into multiple tables by partition key range, using ElastiCache as a read-through cache layer, or requesting a quota increase.

Cost estimation for MCP server workloads

Workload typeApproximate monthly costMode recommendation
Dev/test MCP server (100 req/hour)<$1/monthOn-demand
Low-traffic production (1,000 req/hour)$3–8/monthOn-demand
Mid-traffic production (10,000 req/hour)$30–80/monthOn-demand → switch to provisioned at ~2 weeks
High-traffic production (100,000 req/hour)$150–$400/month on-demand; $50–$100 provisionedProvisioned at steady load
Storage per GB (per month)$0.25/GBUse default_time_to_live to cap data growth
PITR overhead~$0.20 per GB stored per month additionalAlways enable in production
On-demand backup storage$0.10/GB/monthDelete after migration completes

Related guides