AGENT SKILL

dynamodb-table-deployer

Provisions DynamoDB tables with production-grade defaults: partition key design (random suffix, composite keys), sort key design (range queries, hierarchical data), GSI design (sparse indexes, ALL/KEYS_ONLY/INCLUDE projection), on-demand vs provisioned capacity choice, PITR enabled by default, SSE-KMS with customer-managed CMK for compliance, TTL configuration, DynamoDB Streams (NEW_AND_OLD_IMAGES for CDC), table class (Standard vs Standard-IA), deletion protection, and resource-based policies. Emits a READY_TO_DEPLOY checklist with verification commands. Use when creating a new DynamoDB table, hardening an existing table for production, validating schema/key design before go-live, designing GSIs for alternate access patterns, or generating a Terraform / CloudFormation skeleton. Triggers: create DynamoDB table, provision DynamoDB, partition key design, GSI design, DynamoDB Streams, TTL configuration, global tables, Aurora zero-ETL, OpenSearch zero-ETL.

License 许可
Apache-2.0
最近更新
2026-09-24
Stars
★ 4
Forks
0

01 前言 Front Matter

name
dynamodb-table-deployer
license
Apache-2.0
metadata
{ "tags": "aws, dynamodb, cloudops, deploy, databases, provisioning, partition-key, gsi, pitr, sse-kms, ttl, streams, deletion-protection", "phase": "1", "author": "Jacky Chan — AWS Community Builder", "domain": "aws-cloudops", "family": "Databases", "version": "0.1.0", "keywords": "aws, dynamodb, cloudops, deploy, provisioning, partition key, sort key, gsi, global secondary index, lsi, on-demand, provisioned, pay per request, autoscaling, pitr, point-in-time recovery, sse-kms, ttl, time to live, dynamodb streams, cdc, table class, standard-ia, deletion protection, global tables, zero-etl, aurora zero-etl, opensearch zero-etl", "task_type": "deploy", "complexity": "high", "entry_point": "false", "skill_class": "capability", "when_to_use": "Invoke when the user wants to create a new DynamoDB table with production defaults, design a partition/sort key scheme, plan GSI access patterns, harden an existing table before production, validate key/schema design before go-live, plan CDC pipelines via DynamoDB Streams, set up global tables, or generate provisioning CLI commands / IaC templates. Do NOT invoke for auditing existing table posture (use dynamodb-table-auditor), or for non-DynamoDB NoSQL (DocumentDB, ElastiCache, Neptune, Timestream).", "dependencies": "aws-orchestrator", "requires_llm": "true", "verdict_shape": "READY_TO_DEPLOY | PREREQUISITES_MISSING", "lifecycle_status": "experimental", "supports_pipeline": "true" }
description
Provisions DynamoDB tables with production-grade defaults: partition key design (random suffix, composite keys), sort key design (range queries, hierarchical data), GSI design (sparse indexes, ALL/KEYS_ONLY/INCLUDE projection), on-demand vs provisioned capacity choice, PITR enabled by default, SSE-KMS with customer-managed CMK for compliance, TTL configuration, DynamoDB Streams (NEW_AND_OLD_IMAGES for CDC), table class (Standard vs Standard-IA), deletion protection, and resource-based policies. Emits a READY_TO_DEPLOY checklist with verification commands. Use when creating a new DynamoDB table, hardening an existing table for production, validating schema/key design before go-live, designing GSIs for alternate access patterns, or generating a Terraform / CloudFormation skeleton. Triggers: create DynamoDB table, provision DynamoDB, partition key design, GSI design, DynamoDB Streams, TTL configuration, global tables, Aurora zero-ETL, OpenSearch zero-ETL.
compatibility
Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with dynamodb, application- autoscaling, kms, and iam access. Works with Terraform aws_dynamodb_table resources and CloudFormation AWS::DynamoDB::Table templates.

02 资源文件 20

03 SKILL.md 正文

DynamoDB Table Deployer

An AWS CloudOps agent skill that provisions DynamoDB tables with correct defaults. The skill walks the operator through a 10-step provisioning procedure, captures the operator's access-pattern decisions (partition key, sort key, GSI projections, capacity mode), explains why each default matters, and emits a READY_TO_DEPLOY checklist with copy-pasteable verification commands.

Activation keywords

create DynamoDB table, provision DynamoDB, DynamoDB deployment, partition key design, sort key design, hot partition, random suffix, composite key, GSI design, sparse index, ALL projection, KEYS_ONLY projection, INCLUDE projection, on-demand capacity, provisioned capacity, PAY_PER_REQUEST, autoscaling, PITR, point-in-time recovery, SSE-KMS, customer-managed CMK, DynamoDB TTL, item expiration, DynamoDB Streams, NEW_AND_OLD_IMAGES, CDC pipeline, table class, Standard-IA, deletion protection, global tables, Aurora zero-ETL, OpenSearch zero-ETL, resource-based policy.

Invocation contract (hard requirement)

When this skill is invoked with a table-provisioning request (table name, access pattern, workload shape, region, or a partial configuration), the agent MUST respond with the READY_TO_DEPLOY checklist defined in §"Output format" using the literal all-caps labels TABLE:, VERDICT:, CHECKLIST:, and VERIFICATION_COMMANDS:. Do NOT preface the checklist with prose, headings, or disclaimers — emit the block as the first lines of the response. This contract is what assertion-based evals and downstream provisioning pipelines rely on; deviating from the literal labels breaks automation silently.

Mindset

Three provisioning misconceptions (natural-key hot partitions, on-demand burst bucket, GSI cost cascade) moved verbatim to references/advanced-patterns.md. Load on demand when explaining why creation-time decisions matter.

Reasoning framework (why provisioning order matters)

Six ordering rules (key schema before first write, LSI creation-only, capacity mode before traffic, GSI autoscaling at creation, SSE-KMS before first write, additive settings early) moved verbatim to references/advanced-patterns.md. Load on demand when sequencing the provisioning run.

DynamoDB configuration dependency graph (novel heuristic)

Configuration dependency graph (13-row immutability/silent-failure matrix plus cross-dependency gotchas) moved verbatim to references/advanced-patterns.md. Load on demand when a configuration interaction is unclear.

Expert heuristic: partition key cardinality calculator

Partition key cardinality calculator (10,000-distinct-values rule, quick-check formula, common scenarios) moved verbatim to references/advanced-patterns.md. Load on demand when sizing a write-heavy partition key.

Expert heuristic: GSI cost multiplier

GSI cost multiplier (ceil(item_size_kb) x gsi_count, 12-WCU worked example, 30%-of-bill budget heuristic) moved verbatim to references/advanced-patterns.md. Load on demand before adding the 3rd GSI.

Expert heuristic: adaptive capacity false sense of security

Adaptive capacity deep dive (~30-second borrow window, what it does NOT do, throttling signature, on-demand burst bucket) moved verbatim to references/advanced-patterns.md. Load on demand when throttling appears despite adequate capacity.

Prerequisites (verify before provisioning)

Before emitting provisioning commands, verify these prerequisites. If any are missing, the verdict is PREREQUISITES_MISSING with a specific gap citation.

Prerequisite Why it matters How to verify
AWS account with DynamoDB access Can't provision without it aws sts get-caller-identity
Region selected Capacity, KMS, and Streams are region-scoped aws configure get region
Table name available and unique in this region (and globally if Global Tables planned) Names are region-unique; Global Tables require unique name across all replica regions aws dynamodb describe-table --table-name <name> returns ResourceNotFoundException
KMS key ARN (if SSE-KMS with customer CMK) Custom encryption requires a CMK in the same region with a key policy granting DynamoDB aws kms describe-key --key-id <cmk-id>
Access-pattern description Key schema, sort key, and GSI design are access-pattern-driven and immutable Captured in the prompt or follow-up question
CMK key policy grants DynamoDB service + calling principal SSE-KMS requires kms:GenerateDataKey + kms:Decrypt grants aws kms get-key-policy --key-id <cmk-id> --policy-name default

If any prerequisite is missing, output VERDICT: PREREQUISITES_MISSING and cite the specific gap.

10-step provisioning procedure

Step 1 — Partition key design (immutable — decide BEFORE create-table)

The partition key determines how writes distribute across physical partitions. A bad partition key is the single highest-impact DynamoDB design mistake and is immutable after creation.

Decision tree:

  • High-cardinality, even-distribution workload (session store, ad-tech events, IoT telemetry, user-profile keying by userId): use the natural high-cardinality attribute directly. Verify with a histogram of the attribute if possible.

  • Monotonically increasing attribute as the natural key (timestamp, auto-increment id, sequential orderId): append a random suffix (e.g., 0-99 or a hash bucket) and use <naturalKey>#<suffix> as the partition key. Distributes writes across N buckets → N physical partitions.

    orderId: 100001  →  partition key: "100001#37"
    orderId: 100002  →  partition key: "100002#04"
    orderId: 100003  →  partition key: "100003#71"
    

    The application generates the suffix (random or hash of an unrelated attribute); reads must fan out across all suffixes if the natural key must be reconstructed. This is the canonical fix for hot-partition write throttling.

  • Composite key for hierarchical data (multi-tenant, time-bucketed): combine tenantId + bucketId into the partition key (e.g., <tenantId>#<yyyy-mm>), use a sort key for the intra-bucket ordering. Distributes tenants across partitions while keeping tenant data co-located for efficient queries.

  • Low-cardinality attribute (status, category, boolean): NEVER use as the partition key alone — writes will concentrate on 1-few partitions. Combine with a high-cardinality attribute to form a composite key.

Why decided at creation: the partition key is part of KeySchema in create-table and is immutable. Re-keying an existing table means create-new → backfill (with re-partitioning) → cutover. Decide before the first write.

Common mistake: using a timestamp-prefix partition key for time-series data. All writes in the current second/minute/hour hit one partition (DynamoDB hashes the partition key, but a low-cardinality timestamp prefix still concentrates writes within a time bucket). Use the random-suffix pattern OR use the sort key for time within a high-cardinality partition.

Step 2 — Sort key design (immutable — decide BEFORE create-table)

The sort key enables range queries (between, begins_with) within a partition. Decide at creation; sort key is immutable.

Decision tree:

  • Time-range queries within an entity (orders for a user, events for a session, messages in a thread): partition key = entity id, sort key = timestamp (ISO 8601 or epoch). Enables Query with KeyConditionExpression: pk = :entity AND sk BETWEEN :start AND :end.

  • Hierarchical data (category/subcategory paths, file paths): sort key = path (e.g., category/subcategory/item). Enables begins_with queries for subtree retrieval.

  • Latest-item lookup (leaderboards, current state): use a sort key that sorts newest-first. For numeric/epoch sort keys, store the negation or MAX_VALUE - timestamp so the latest sorts first.

  • No range-query need: omit the sort key (table can have partition key only). Adding a sort key later requires re-creating the table.

Common mistake: planning to use a non-key attribute for range queries post-creation. Either (a) add it as the sort key now (immutable), (b) add an LSI now (immutable, only-at-creation, 5-per-table limit), or (c) add a GSI later (mutable but with capacity/cascade implications).

Step 3 — Local Secondary Indexes (LSI) — decide NOW or forever hold peace

LSIs enable range queries on a non-key sort attribute within the SAME partition key as the base table. They can ONLY be created at create-table time — there is NO API to add an LSI later.

Hard limits (do not exceed):

  • 5 LSIs per table (HARD API-enforced limit — cannot be raised via support ticket).
  • 10 GB per-partition size limit on indexed data (silently rejects writes past this point — must monitor per-partition index size).

When to provision an LSI at creation:

  • Workload needs strong consistency on the alternate sort attribute (LSI supports eventually-consistent AND strongly-consistent reads; GSI only eventually-consistent).
  • Workload needs range queries within the base table's partition key on a different sort attribute.

When to defer to a GSI (added later):

  • The alternate access pattern uses a DIFFERENT partition key (LSI shares the base partition key).
  • Eventual consistency is acceptable.
  • You are unsure — GSIs are reversible; LSIs are not.

Common mistake: deciding to "add the LSI later." There is no later. If the workload MIGHT need range queries on a non-key attribute, decide at creation. Document the decision in the checklist.

Step 4 — Global Secondary Indexes (GSI) — design at provisioning

GSIs enable alternate access patterns with a different partition key. They CAN be added post-creation, but each GSI has its own capacity, its own throttle cascade back to the base table, and counts toward the 20-per-table soft quota.

Projection type decision (drives storage cost + write amplification):

Projection What it stores Write cost Storage cost Use when
ALL Entire base-table item highest (every base write replicates fully) highest GSI is read-heavy and you want to avoid a follow-up GetItem
INCLUDE Keys + specified non-key attributes medium (only listed attributes projected) medium GSI needs a few specific attributes (e.g., status, name)
KEYS_ONLY Only the GSI's key attributes lowest (minimum replication) lowest GSI is a lookup index; follow up with GetItem from the base table for full data

Sparse index pattern: a GSI where the sort key attribute only exists on SOME items becomes a sparse index — only items with that attribute appear in the GSI. Powerful for "find all items in state X" queries without scanning the whole table.

Capacity per GSI (PROVISIONED mode): each GSI has its OWN RCU/WCU allocation. A GSI with insufficient WCU throttles BASE TABLE writes — the cascade rule. Always register autoscaling on every GSI in PROVISIONED mode (Step 5).

Quota check: the 20-GSI-per-table soft limit can be raised via support ticket. The 5-LSI limit cannot. Plan GSI count at provisioning.

Common mistake: provisioning a GSI with ALL projection "for convenience." Every base-table write now fully replicates to the GSI, doubling write cost. Default to KEYS_ONLY and follow up with a GetItem; upgrade to INCLUDE only for known hot attributes.

Step 5 — Capacity mode + autoscaling

Choose between PAY_PER_REQUEST (on-demand) and PROVISIONED with autoscaling based on the traffic profile, not on a desire to avoid capacity planning.

Decision matrix:

Traffic profile Recommended mode Why
Unknown / new workload PAY_PER_REQUEST (on-demand) No capacity planning needed; pay per request
Bursty / unpredictable PAY_PER_REQUEST (on-demand) Autoscaling has 3-5 min lag; on-demand handles spikes (within burst bucket)
Steady high-throughput PROVISIONED + autoscaling 3-5x cheaper than on-demand at sustained load
Idle / dev / test PAY_PER_REQUEST (on-demand) Pay zero when table is idle; provisioned has minimum capacity charges
Once-per-hour batch PAY_PER_REQUEST (on-demand) Cold-start burst bucket handles the spike better than provisioned scale-out lag

On-demand burst bucket caveat (trailing 30-minute average, empty on cold start) moved verbatim to references/advanced-patterns.md. Load on demand when on-demand is chosen for bursty traffic.

PROVISIONED autoscaling registration CLI (register-scalable-target + TargetTrackingScaling policies, per-GSI repeat) moved verbatim to references/provisioning-cli-commands.md. Load on demand when provisioning a PROVISIONED table.

Common mistake: registering autoscaling on the base table but NOT on a GSI. The GSI throttles and cascades back to the base table — the most commonly missed capacity misconfiguration.

Switching modes: DynamoDB enforces a cooldown between PAY_PER_REQUEST ↔ PROVISIONED switches. Don't switch per-request.

Step 6 — Encryption (SSE-KMS)

DynamoDB ALWAYS encrypts at rest. The decision is whether to use AWS-managed or customer-controlled encryption:

Option SSEType Key policy control CloudTrail visibility Use when
Default (AWS-owned key) AES256 none none dev / test / non-compliance workloads
AWS-managed KMS key (alias/aws/dynamodb) KMS limited (DynamoDB-managed) partial when KMS API visibility matters but key policy does not
Customer-managed CMK KMS with explicit KMSMasterKeyArn full (you set the policy) full (per-call Decrypt events) compliance (PCI-DSS, HIPAA, SOC2), cross-account, regulated data

For compliance workloads, always use a customer-managed CMK and verify the key policy grants kms:GenerateDataKey + kms:Decrypt to both dynamodb.<region>.amazonaws.com and the calling principal.

aws dynamodb create-table ... \
  --sse-specification Enabled=true,SSEType=KMS,KMSMasterKeyId=arn:aws:kms:<region>:<acct>:key/<cmk-id>

KMS cost warning (quota sharing vs the dedicated aws/dynamodb quota) and the Global Tables CMK-per-region requirement moved verbatim to references/advanced-patterns.md. Load on demand when provisioning SSE-KMS at high throughput or multi-region.

Step 7 — Point-in-time recovery (PITR) — enable by default

PITR enablement CLI, new-table restore semantics, and cost note moved verbatim to references/provisioning-cli-commands.md. Load on demand when enabling PITR.

Step 8 — TTL configuration (optional — automatic item expiration)

TTL automatically deletes items whose specified attribute (epoch seconds) is in the past. Use for: session expiry, log retention, cache eviction, GDPR data-retention enforcement (with caveats below).

aws dynamodb update-time-to-live --table-name <table> \
  --time-to-live-specification Enabled=true,AttributeName=ttl

TTL semantics (do not misrepresent):

  • Items WITHOUT the TTL attribute are NEVER expired.
  • Deletion is by background scanner within 48 hours of the expiry timestamp. Items remain readable until physically deleted.
  • TTL is a cost-optimization feature, NOT a compliance enforcement mechanism. For immediate/verifiable deletion, the application must explicitly DeleteItem.

Common mistake: relying on TTL for GDPR immediate-deletion. The 48-hour lag and the "items without attribute are never expired" rule both break the contract.

Step 9 — Streams + table class + deletion protection

Streams StreamViewType selection, table class choice, and deletion protection CLI moved verbatim to references/provisioning-cli-commands.md. Load on demand when configuring Streams, class, or deletion protection.

Step 10 — Resource-based policy + Global Tables (newer features)

Resource-based policy JSON, Global Tables v2 creation CLI, and the 2024-2026 integration notes (OpenSearch zero-ETL, Aurora zero-ETL, replication metrics) moved verbatim to references/advanced-patterns.md. Load on demand when provisioning cross-account or multi-region tables.

NEVER do these things

  1. NEVER pick a partition key without considering cardinality and write distribution. A monotonically increasing key (timestamp, auto-increment id) creates a hot partition and throttles the table far below its provisioned capacity. Use a random suffix or composite key. Re-keying requires create-new + backfill + cutover.

  2. NEVER plan to "add the LSI later." Local Secondary Indexes can ONLY be created at create-table time. There is NO API to add an LSI post-creation. Decide LSI placement at provisioning or commit to a GSI.

  3. NEVER register autoscaling on the base table but forget the GSIs. A GSI with insufficient WCU throttles writes to the BASE TABLE — the cascade rule. Register autoscaling on every GSI in PROVISIONED mode.

  4. NEVER use the AWS-managed alias/aws/dynamodb key for compliance workloads (PCI-DSS / HIPAA / SOC2 / FedRAMP). You cannot customize the key policy. Use a customer-managed CMK with explicit kms:GenerateDataKey + kms:Decrypt grants.

  5. NEVER rely on TTL for immediate data deletion or GDPR compliance. TTL items persist for up to 48 hours after expiry. Items without the TTL attribute are never expired. TTL is a cost-optimization feature, not a compliance enforcement mechanism.

  6. NEVER assume on-demand mode eliminates capacity risk. On-demand has a finite burst bucket derived from the trailing 30 minutes. A cold-start spike from zero can still throttle. Flag this as operational guidance.

  7. NEVER enable Streams as a "default hardening" step on tables whose workload does not consume CDC. Streams incur write-amplification cost and have a 24-hour retention window. Enable Streams only when there is a downstream consumer (Lambda, OpenSearch sync, Kinesis, Aurora zero-ETL).

  8. NEVER exceed the 5-LSI-per-table limit. It is a HARD API-enforced limit — cannot be raised via support ticket. The 20-GSI soft limit CAN be raised. Plan accordingly at provisioning.

  9. NEVER provision a Global Table replica in a region without the CMK present. A missing key causes InaccessibleEncryptionDateTime — an active outage on that replica. Verify aws kms describe-key in every replica region before adding the replica.

  10. NEVER treat DeletionProtectionEnabled as a security control. Any principal with dynamodb:UpdateTable can disable it. It is an accidental-deletion / ransomware guardrail, not a defense against a determined attacker with database-admin rights.

  11. NEVER switch billing mode for per-request cost optimization. DynamoDB enforces a cooldown between PAY_PER_REQUEST and PROVISIONED switches. Choose based on the sustained traffic profile.

  12. NEVER use ALL projection on a GSI "for convenience." Every base-table write fully replicates, doubling write cost. Default to KEYS_ONLY and follow up with a GetItem; upgrade to INCLUDE for known hot attributes.

Output format

TABLE: <table-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
  [✓|✗] Partition key: <attribute> (<type>) — <design rationale>
  [✓|✗] Sort key: <attribute> (<type>) | None
  [✓|✗] LSIs: <list with sort attributes> | None (5-max HARD limit respected)
  [✓|✗] GSIs: <list with projection types> | None
  [✓|✗] Capacity mode: PAY_PER_REQUEST | PROVISIONED (autoscaling: table ✓ <gsi> ✓)
  [✓|✗] Encryption: SSE-KMS customer CMK (<key-arn>) | AWS-managed (alias/aws/dynamodb) | AES256
  [✓|✗] PITR: Enabled (35-day window)
  [✓|✗] TTL: Enabled (attribute: <name>) | Disabled
  [✓|✗] Streams: NEW_AND_OLD_IMAGES | KEYS_ONLY | NEW_IMAGE | OLD_IMAGE | Disabled
  [✓|✗] Table class: STANDARD | STANDARD_INFREQUENT_ACCESS
  [✓|✗] Deletion protection: Enabled | Disabled
  [✓|✗] Resource-based policy: <summary> | None
  [✓|✗] Global Tables: replicas in <regions> | Single-region
VERIFICATION_COMMANDS:
  aws dynamodb describe-table --table-name <table>
  aws dynamodb describe-continuous-backups --table-name <table>
  aws dynamodb describe-time-to-live --table-name <table>
  aws dynamodb describe-kinesis-destination --table-name <table>   # if Kinesis fan-out
  aws application-autoscaling describe-scaling-policies --service-namespace dynamodb
  aws kms describe-key --key-id <cmk-id>

Worked example — high-throughput session store

TABLE: prod-sessions
VERDICT: READY_TO_DEPLOY
CHECKLIST:
  [✓] Partition key: sessionId (String) — UUID v4, high-cardinality for even write distribution
  [✓] Sort key: None (single-item lookup pattern)
  [✓] LSIs: None (no range-query requirement on alternate sort attribute)
  [✓] GSIs: gsi_by_userId (userId→sessionId, KEYS_ONLY projection, sparse — only items with userId)
  [✓] Capacity mode: PAY_PER_REQUEST (bursty session traffic, unpredictable peaks)
  [✓] Encryption: SSE-KMS customer CMK (alias/prod-dynamodb-key)
  [✓] PITR: Enabled (35-day window)
  [✓] TTL: Enabled (attribute: expiresAt — session token expiry, ~48h lag acceptable)
  [✓] Streams: NEW_AND_OLD_IMAGES (downstream Lambda publishes session-change events)
  [✓] Table class: STANDARD (frequently accessed)
  [✓] Deletion protection: Enabled
  [✓] Resource-based policy: Allow read-only from analytics account 222222222222
  [✓] Global Tables: Single-region (us-east-1)
VERIFICATION_COMMANDS:
  aws dynamodb describe-table --table-name prod-sessions
  aws dynamodb describe-continuous-backups --table-name prod-sessions
  aws dynamodb describe-time-to-live --table-name prod-sessions
  aws kms describe-key --key-id alias/prod-dynamodb-key

Decision tree: on-demand vs provisioned

Is the workload new / unknown traffic pattern?
├── YES → PAY_PER_REQUEST (on-demand)
│         (No capacity planning; switch to PROVISIONED after 2-3 weeks
│          of steady-state traffic data)
└── NO → Is traffic bursty / unpredictable (> 3:1 peak-to-trough ratio)?
    ├── YES → PAY_PER_REQUEST (on-demand)
    │         (Autoscaling has 3-5 min lag; on-demand handles spikes
    │          instantly within the burst bucket)
    └── NO → Is traffic steady and high-throughput (> 5,000 RCU/WCU sustained)?
        ├── YES → PROVISIONED + autoscaling
        │         (3-5x cheaper than on-demand at sustained load)
        └── NO → Is the table idle most of the time (dev / test / low-traffic)?
            ├── YES → PAY_PER_REQUEST (on-demand)
            │         (Pay zero when idle; provisioned has minimum charges)
            └── NO → PROVISIONED + autoscaling
                      (Moderate steady traffic; autoscaling handles
                       gradual changes)

Post-decision review: after 2-3 weeks of production traffic, review CloudWatch ConsumedReadCapacityUnits / ConsumedWriteCapacityUnits. If utilization is > 70% steady, PROVISIONED is cheaper. If utilization is < 30% or highly bursty, stay on-demand. DynamoDB enforces a cooldown between mode switches — do not switch per-request.

Error handling

All four error-handling deep dives (ResourceInUseException, GSI backfill failure, PITR enable failures, autoscaling registration failures) moved verbatim to references/error-handling.md. Load on demand when a provisioning API call fails.

Worked example — provisioned table with GSI + autoscaling

Full provisioned-with-GSI worked example (create-table with GSI, 4x autoscaling registration, PITR/TTL/Streams, checklist) moved verbatim to references/worked-examples.md; the session-store example above is the primary inline example. Load on demand when provisioning a PROVISIONED table with GSIs.

Recent AWS features (2024-2026)

Recent AWS features 2024-2026 (zero-ETL integrations, replication enhancements, resource-based policies, table classes, incremental export, deletion protection GA) moved verbatim to references/advanced-patterns.md. Load on demand when a 2024-2026 feature affects provisioning choices.

References (load on demand)

Domain

AWS CloudOps / DynamoDB Table Provisioning & Schema Design.

AWS documentation

04 同仓库更多 Skills

jhkchan
jhkchan/aws-agent-skills

xray-tracing-deployer

Deploys AWS X-Ray distributed tracing with production-grade configuration: X-Ray daemon deployment (EC2 systemd, ECS sidecar, EKS DaemonSet, Lambda built-in), SDK instrumentation (Java, Python, Node.js, Go, .NET) with annotations and metadata, sampling rules (default reservoir + rate vs custom rules with URL / method / service-name predicates), service map generation, trace query and retrieval, groups and insights, CloudWatch ServiceLens integration, IAM permissions (PutTraceSegments, GetSamplingRules), and latest features (Lambda Powertools tracing, OpenTelemetry / ADOT Collector support, W3C trace context). Emits a READY_TO_DEPLOY checklist with every configuration item verified. Use when enabling X-Ray on a new application, adding tracing to ECS / EKS / Lambda, validating a sampling configuration, or generating daemon deployment CLI and IaC templates. Triggers: X-Ray, distributed tracing, X-Ray daemon, sampling rules, service map, X-Ray SDK, OpenTelemetry, ADOT, Lambda Powertools, CloudWatch ServiceLens.

★ 4
jhkchan
jhkchan/aws-agent-skills

wellarchitected-workload-auditor

Audits AWS Well-Architected Tool workloads for review staleness, per-pillar high-risk issue counts, milestone tracking gaps, and remediation plan completeness. Emits a deterministic verdict (STALE_REVIEW | HIGH_RISK | CONFIG_GAP | OK) per workload with per-pillar risk breakdown, milestone trend analysis, and specific remediation. Use when reviewing Well-Architected workloads, checking WA review freshness, auditing high-risk issues per pillar, validating milestone coverage, or tracking remediation plans.

★ 4
jhkchan
jhkchan/aws-agent-skills

wellarchitected-review-operator

Operates AWS Well-Architected Tool reviews end-to-end — creates workloads, runs pillar reviews (operational excellence, security, reliability, performance, cost optimization, sustainability, Prosperity), answers questions with risk-tier rationale, generates reports and improvement plans, creates milestones, and integrates with Trusted Advisor and Well-Architected Labs. Runs deterministic pre-checks (workload existence, lens availability, pillar coverage), emits the exact update-answer / get-consolidated-report CLI behind a CONFIRM gate, and verifies risk-tier transitions. Emits READY | BLOCKED | COMPLETED. Use when creating a workload, answering pillar questions, generating an improvement plan, creating a milestone, or integrating with Trusted Advisor. Triggers: well-architected tool, well architected review, workload review, pillar, operational excellence, security, reliability, performance, cost optimization, sustainability, prosperity, improvement plan, milestone, trusted advisor.

★ 4
jhkchan
jhkchan/aws-agent-skills

wafv2-web-acl-deployer

Provisions AWS WAFv2 Web ACLs with correct production defaults: scope selection (CLOUDFRONT vs REGIONAL), managed rule groups (AWSManagedRulesCommonRuleSet, SQLiRuleSet, LinuxRuleSet, WindowsRuleSet, IPReputationList, BotControlRuleSet, AmazonIpReputationList, ATP), custom rules (byte match, IP set, regex pattern, geo match, size constraint, rate-based), rule priority ordering, logging destinations (Kinesis Firehose, CloudWatch Logs, S3), resource association (ALB, API Gateway, CloudFront), rate-based rules with aggregate keys (IP, forwarded IP), Challenge and CAPTCHA actions, and account takeover prevention. Emits a READY_TO_DEPLOY checklist. Use when creating a Web ACL, attaching managed rules, configuring rate limiting, enabling WAF logging, associating a Web ACL with an ALB/API Gateway/CloudFront, or configuring CAPTCHA/Challenge actions. Triggers: create WAF Web ACL, WAFv2, managed rule groups, WAF rate limiting, WAF logging, WAF CAPTCHA, WAF Challenge action, bot control, ATP managed rules.

★ 4
jhkchan
jhkchan/aws-agent-skills

wafv2-web-acl-auditor

Audits AWS WAFv2 Web ACL configurations to determine whether the ACL provides effective protection: default-action posture (Allow vs Block), managed-rule-group coverage gaps, rule effectiveness (BLOCK vs COUNT, shadow/bypass rules, stale exclusions), rate-based rule correctness, logging and visibility configuration, and text-transformation bypass vectors. Emits a deterministic verdict per Web ACL. Use when reviewing a WAFv2 Web ACL for security posture, checking managed-rule coverage, validating rate-limit configuration, auditing WAF logging, or hardening a WAF before production deployment. Triggers: WAF, WAFv2, Web ACL, managed rule group, AWSManagedRules, rate-based rule, CAPTCHA, Challenge, OverrideAction, Count mode, forwarded IP, Bot Control, ATP, text transformation, WAF logging, WAF visibility, OWASP, SQLi, XSS, RFI.

★ 4
jhkchan
jhkchan/aws-agent-skills

waf-rule-deployer

Provisions AWS WAFv2 rule sets with production defaults: Web ACL creation (CloudFront scope in us-east-1 vs Regional scope), rule groups (managed vs custom) with capacity planning in WCU (Web ACL Capacity Units, 1500 default per ACL), managed rule groups (AWSManagedRulesCommonRuleSet, AWSManagedRulesSQLiRuleSet, AWSManagedRulesAmazonIpReputationList, AWSManagedRulesLinuxRuleSet, AWSManagedRulesWindowsRuleSet, AWSManagedRulesUnixRuleSet), custom rules (byte-match, regex pattern set, geo-match, rate-based), IP set and regex pattern set resources, rule priority ordering (lowest number evaluated first), action types (allow, block, count, CAPTCHA, Challenge), bot control managed rule group, account takeover. Triggers: create WAF rule, WAF managed rule group, WAF custom rule, WAF byte match, WAF geo match, WAF rate based rule, WAF IP set, WAF regex pattern set, WAF WCU budget, WAF CloudFront ACL, WAF logging Kinesis Firehose, WAF bot control, WAF ATP, WAF label matching, WAF Challenge action, WAF CAPTCHA.

★ 4