[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A4WDS7CVAGZBBF40EH1N0B":3,"skill-same:01M7A4WDS7CVAGZBBF40EH1N0B":146},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":45,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7A4WDS7CVAGZBBF40EH1N0B","cloudfront-keyvaluestore-deployer",null,"Provisions CloudFront KeyValueStore (KVS) with production defaults: KVS creation and key-value pair management, CloudFront Functions integration (read KVS data at the edge without redeploy), A\u002FB testing request routing via KVS, feature flag toggles at the edge, IP allowlists and blocklists, URL redirects and rewrites driven by KVS, KVS size limits (1 MB max store, key\u002Fvalue constraints), KVS propagation and eventual consistency model, and the latest CloudFront Functions KVS API (cloudfront-js-2.0 with cf.openKvs). Emits a READY_TO_DEPLOY checklist with verification commands. Use when provisioning a CloudFront KeyValueStore, integrating CloudFront Functions with KVS for edge-side routing, implementing A\u002FB testing or feature flags at the CDN edge, or building IP allowlist logic. Triggers: create CloudFront KeyValueStore, KVS CloudFront Functions, edge A\u002FB testing, feature flags KVS, IP allowlist KVS, cf.openKvs, cloudfront-js-2.0.","jhkchan\u002Faws-agent-skills","jhkchan","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1083902?v=4","01M7A2SVQYP9GQTPTDXP5JKYQ4","Jacky Chan","01M7A2SVS117YWCTZABB75HZR1",4,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: cloudfront-keyvaluestore-deployer\ndescription: 'Provisions CloudFront KeyValueStore (KVS) with production defaults: KVS creation and key-value pair management, CloudFront Functions integration (read KVS data at the edge without redeploy), A\u002FB testing request routing via KVS, feature flag toggles at the edge, IP allowlists and blocklists, URL redirects and rewrites driven by KVS, KVS size limits (1 MB max store, key\u002Fvalue constraints), KVS propagation and eventual consistency model, and the latest CloudFront Functions KVS API (cloudfront-js-2.0 with cf.openKvs). Emits a READY_TO_DEPLOY checklist with verification commands. Use when provisioning a CloudFront KeyValueStore, integrating CloudFront Functions with KVS for edge-side routing, implementing A\u002FB testing or feature flags at the CDN edge, or building IP allowlist logic. Triggers: create CloudFront KeyValueStore, KVS CloudFront Functions, edge A\u002FB testing, feature flags KVS, IP allowlist KVS, cf.openKvs, cloudfront-js-2.0.'\nlicense: Apache-2.0\ncompatibility: 'Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with cloudfront and cloudfront-keyvaluestore access. Works with Terraform aws_cloudfront_key_value_store \u002F aws_cloudfront_function resources and CloudFormation AWS::CloudFront::KeyValueStore templates.'\nmetadata:\n  domain: aws-cloudops\n  complexity: medium\n  requires_llm: 'true'\n  phase: '1'\n  supports_pipeline: 'true'\n  entry_point: 'false'\n  family: Networking\n  task_type: deploy\n  skill_class: capability\n  lifecycle_status: active\n  verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING\n  version: 0.1.0\n  author: Jacky Chan — AWS Community Builder\n  tags: aws, cloudfront, keyvaluestore, cloudfront-functions, networking, cloudops, deploy, edge-computing, provisioning, feature-flags, ab-testing\n  dependencies: aws-orchestrator\n  keywords: aws, cloudfront, keyvaluestore, kvs, cloudfront functions, edge computing, cloudops, deploy, provisioning, a\u002Fb testing, feature flags, ip allowlist, ip blocklist, url redirect, edge routing, cloudfront-js-2.0, cf.openkvs, eventual consistency\n  when_to_use: Invoke when the user wants to create a CloudFront KeyValueStore (KVS), integrate CloudFront Functions with KVS for edge-side data lookup, implement A\u002FB testing or canary routing at the CDN edge, deploy feature flags that toggle without function redeployment, build IP allowlist or blocklist logic in CloudFront Functions, or drive URL redirects\u002Frewrites from externally managed key-value data. Do NOT invoke for Lambda@Edge (different runtime, no KVS access), for CloudFront origin failover (use origin groups, not KVS), for caching behavior changes (use cache policies, not KVS), or for auditing existing CloudFront distributions (use cloudfront-distribution-auditor).\n---\n\n# CloudFront KeyValueStore Deployer\n\nAn AWS CloudOps agent skill that provisions CloudFront KeyValueStore\n(KVS) with correct defaults. Walks the operator through KVS creation,\nkey-value pair management, CloudFront Functions integration, and\nuse-case patterns (A\u002FB testing, feature flags, IP allowlists), and\nemits a READY_TO_DEPLOY checklist with verification commands.\n\n## Activation keywords\n\ncreate CloudFront KeyValueStore, KVS CloudFront Functions, edge A\u002FB\ntesting, feature flags KVS, IP allowlist KVS, cf.openKvs,\ncloudfront-js-2.0 runtime, KVS propagation, KVS 1MB limit.\n\n## STRICT output contract\n\nWhen this skill is invoked with a CloudFront-KVS-provisioning request\n(KVS creation, Functions integration, A\u002FB testing, feature flags, IP\nallowlist, or a partial configuration), the agent MUST respond with the\nREADY_TO_DEPLOY checklist defined in the \"Output format\" section using\nthe literal all-caps labels `KVS_DEPLOYMENT:`, `VERDICT:`, `CHECKLIST:`,\nand `VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,\nheadings, or disclaimers — emit the block as the first lines of the\nresponse. This contract is what assertion-based evals and downstream\nprovisioning pipelines rely on; deviating from the literal labels breaks\nautomation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation in the checklist\n(marked `[✗]`), and `READY_TO_DEPLOY` MUST NOT also appear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — KVS creation (store + key-value pairs) | Store setup |\n| Step 2 — Key-value pair management (put\u002Fget\u002Fdelete) | Data management |\n| Step 3 — CloudFront Functions integration (cf.openKvs) | Function linkage |\n| Step 4 — A\u002FB testing routing via KVS | Traffic splitting |\n| Step 5 — Feature flags via KVS | Flag toggles |\n| Step 6 — IP allowlists \u002F blocklists via KVS | Access control |\n| Step 7 — KVS size limits (1 MB store, key\u002Fvalue constraints) | Sizing |\n| Step 8 — KVS propagation and eventual consistency | Consistency model |\n| Step 9 — Recent features | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fkvs-functions-integration.md | Functions KVS API detail |\n| references\u002Fprovisioning-cli-commands.md | Copy-pasteable CLI sequence |\n\n## Mindset\n\n**One-line takeaway:** CloudFront KeyValueStore (KVS) is a managed key-\nvalue data store that CloudFront Functions read at the edge. It lets\nyou change routing, feature flags, IP lists, and redirect rules WITHOUT\nredeploying function code — update the KVS data and the change\npropagates to edge locations within seconds.\n\nThree misconceptions dominate KVS misdesign at provisioning time:\n\n- **\"I can store large datasets in KVS.\"** You cannot. The total store\n  size is limited to 1 MB (including keys, values, and metadata). KVS is\n  for small, high-velocity configuration data — not a general-purpose\n  database. Exceeding 1 MB returns `SizeLimitExceeded`.\n\n- **\"KVS updates are instantly visible at every edge.\"** They are not.\n  KVS is eventually consistent. Updates propagate to edge locations\n  within seconds to minutes. Functions at different PoPs may read stale\n  data briefly. If you need immediate consistency, KVS is the wrong tool.\n\n- **\"I can write to KVS from inside a CloudFront Function.\"** You\n  cannot. Functions have READ-ONLY access to KVS. All writes (put-key,\n  delete-key) happen via the AWS API (CLI, SDK, Console, IaC). The\n  function reads; the operator writes.\n\n## Configuration dependency graph (novel heuristic)\n\nKVS configurations are NOT independent. The function runtime, KVS\nassociation, and data schema interact in ways that silently break at\nthe edge. Use this graph both to sequence provisioning and to debug\n\"why isn't my function reading the KVS?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| KVS store | none — `create-key-value-store` | store name is immutable after creation (must delete + recreate to rename) | key-value pairs |\n| Key-value pairs | KVS store exists (`--kvs-arn`) | total store size MUST stay under 1 MB (keys + values); `SizeLimitExceeded` on overflow | edge reads from Functions |\n| Function runtime | `cloudfront-js-2.0` (required for KVS API) | `cloudfront-js-1.0` does NOT support `cf.openKvs()` — function silently fails | KVS read access |\n| Function-KVS link | function `FunctionConfig.Runtime` = `cloudfront-js-2.0` | KVS is associated at function level, NOT at distribution level; unlinked function gets `null` from `openKvs()` | edge data lookup |\n| Distribution association | function exists + published (`PublishFunction`) | unpublished functions (`DEVELOPMENT` stage) are NOT invoked at the edge; test with `TestFunction` first | live edge execution |\n| KVS data schema | consistent key naming across all edge locations | inconsistent key casing (`userID` vs `userId`) causes `get()` to return `undefined` silently | correct routing decisions |\n| etag (concurrency) | `--if-match \u003Cetag>` for all updates | stale etag → `PreconditionFailed`; always re-fetch etag before update | safe concurrent writes |\n\n**The runtime and etag rows are the ones a baseline model misses.** A\nfunction created with `cloudfront-js-1.0` cannot read KVS — the\n`cf.openKvs()` call does not exist in that runtime. And every KVS\nupdate requires the current etag; a stale etag silently fails.\n\n**Cross-dependency gotchas:**\n- The function runtime MUST be `cloudfront-js-2.0` for KVS access.\n- KVS is linked to the FUNCTION, not the distribution. Multiple\n  distributions can use the same function (and thus the same KVS).\n- The function must be PUBLISHED (`PublishFunction`) before it executes\n  at the edge. A function in `DEVELOPMENT` stage runs only in tests.\n- KVS data is eventually consistent. Do not use KVS for time-critical\n  kill switches that must be instant across all PoPs.\n- The etag changes on every KVS update. Scripts that batch-update keys\n  must re-fetch the etag between each `put-key` call.\n\n## Expert heuristic: KVS read-write asymmetry and etag concurrency\n\nExpert heuristic on KVS read-write asymmetry and etag concurrency (write path vs read path, A\u002FB rotation pattern, etag chaining, propagation window) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when planning KVS updates or debugging stale reads.\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING** with a\nspecific gap citation.\n\n| Prerequisite | Why it matters | How to verify |\n|---|---|---|\n| AWS account with CloudFront access | Can't provision without it | `aws sts get-caller-identity` |\n| KVS data size under 1 MB | Hard limit; `SizeLimitExceeded` on overflow | Estimate total key+value bytes |\n| Function runtime `cloudfront-js-2.0` | KVS API (`cf.openKvs`) requires this runtime | Check function config |\n| CloudFront distribution exists | KVS + Function are attached to a distribution | `aws cloudfront list-distributions` |\n| KVS key naming convention | Inconsistent casing causes silent `undefined` reads | Define and document key schema |\n| Write path identified (CLI\u002FSDK\u002FIaC) | Functions cannot write to KVS | Confirm update mechanism |\n| etag handling in update scripts | Stale etag → `PreconditionFailed` | Script must re-fetch or chain etags |\n\n## Step 1 — KVS creation (store + key-value pairs)\n\nThe first step is creating the KVS store. The store is a container for\nkey-value pairs. Once created, you populate it with data.\n\n**Create the KVS store:**\n\n```bash\nKVS_ARN=$(aws cloudfront create-key-value-store \\\n  --name \"ab-testing-kvs\" \\\n  --comment \"A\u002FB testing traffic split configuration\" \\\n  --query 'KeyValueStore.ARN' --output text)\n\necho \"KVS ARN: $KVS_ARN\"\n```\n\n**KVS store attributes:**\n- `name`: immutable after creation. To rename, delete and recreate.\n- `comment`: mutable via `update-key-value-store`.\n- `status`: `READY` when the store is available for reads.\n- `size`: current size in bytes (must stay under 1 MB).\n- `itemCount`: number of key-value pairs.\n- `etag`: concurrency token; changes on every mutation.\n\n**Retrieve the KVS etag (required for all writes):**\n\n```bash\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --query 'ETag' --output text)\n```\n\n**Common mistake:** creating the KVS with a generic name like \"kvs1\"\nand later needing to rename it. The name is immutable — choose a\ndescriptive name reflecting the use case.\n\n## Step 2 — Key-value pair management (put\u002Fget\u002Fdelete)\n\nKey-value pairs are managed via the `cloudfront-keyvaluestore` API\nnamespace (separate from the `cloudfront` namespace for store creation).\n\n**Put a key:**\n\n```bash\n# Re-fetch etag before each write (etag changes on every mutation)\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" --query 'ETag' --output text)\n\naws cloudfront-keyvaluestore put-key \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --key \"traffic-split\" \\\n  --value \"variant-b\" \\\n  --if-match \"$ETAG\"\n```\n\n**List all keys:**\n\n```bash\naws cloudfront-keyvaluestore list-keys \\\n  --kvs-arn \"$KVS_ARN\"\n```\n\n**Delete a key:**\n\n```bash\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" --query 'ETag' --output text)\n\naws cloudfront-keyvaluestore delete-key \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --key \"traffic-split\" \\\n  --if-match \"$ETAG\"\n```\n\n**Key-value constraints:**\n- Key length: up to 512 characters.\n- Value length: up to 3 KB (3072 bytes) per value.\n- Total store size: 1 MB maximum (all keys + values combined).\n- Key characters: alphanumeric, hyphens, underscores, periods, colons,\n  forward slashes. No spaces.\n- Key matching is case-SENSITIVE. `UserID` and `userId` are different keys.\n\n**Common mistake:** using inconsistent key casing across the write path\n(CLI) and read path (function). The CLI writes `traffic-split` but the\nfunction reads `TrafficSplit`. The `get()` returns `undefined` silently.\n\n## Step 3 — CloudFront Functions integration (cf.openKvs)\n\nThe KVS is read by a CloudFront Function at the edge. The function\nmust use the `cloudfront-js-2.0` runtime and link to the KVS.\n\n**Create a CloudFront Function with KVS access:**\n\n```bash\n# function.js — reads KVS at the edge\ncat > function.js \u003C\u003C 'EOF'\nimport cf from 'cloudfront';\n\nconst kvs = cf.openKvs();  \u002F\u002F opens the KVS linked to this function\n\nfunction handler(event) {\n    const request = event.request;\n    const cohort = kvs.get('traffic-split');\n\n    if (cohort === 'variant-b') {\n        request.uri = request.uri.replace('\u002Fapi\u002F', '\u002Fapi-v2\u002F');\n    }\n    return request;\n}\nEOF\n\naws cloudfront create-function \\\n  --name \"ab-test-router\" \\\n  --function-config '{\"Comment\":\"A\u002FB test router via KVS\",\"Runtime\":\"cloudfront-js-2.0\"}' \\\n  --function-code fileb:\u002F\u002Ffunction.js \\\n  --key-value-store-associations '[\"'\"$KVS_ARN\"'\"]'\n```\n\n**Publish the function (required for edge execution):**\n\n```bash\naws cloudfront publish-function \\\n  --name \"ab-test-router\" \\\n  --if-match \"$FUNCTION_ETAG\"\n```\n\n**Associate the function with a distribution:**\n\n```bash\naws cloudfront update-distribution \\\n  --id \"$DIST_ID\" \\\n  --if-match \"$DIST_ETAG\" \\\n  --distribution-config '{\n    ...,\n    \"DefaultCacheBehavior\": {\n      ...,\n      \"FunctionAssociations\": {\n        \"Quantity\": 1,\n        \"Items\": [{\n          \"FunctionARN\": \"arn:aws:cloudfront::123456789012:function\u002Fab-test-router\",\n          \"EventType\": \"viewer-request\"\n        }]\n      }\n    }\n  }'\n```\n\n**Critical integration rules:**\n- The function runtime MUST be `cloudfront-js-2.0`. The `cloudfront-js-1.0`\n  runtime does NOT have the `cf.openKvs()` API.\n- The KVS is linked to the FUNCTION via `--key-value-store-associations`,\n  NOT at the distribution level.\n- The function must be PUBLISHED before edge execution. Unpublished\n  functions (`DEVELOPMENT` stage) only run in `test-function`.\n- `EventType` is typically `viewer-request` for routing\u002Fredirect logic.\n\n**Common mistake:** creating the function with the default\n`cloudfront-js-1.0` runtime. The `cf.openKvs()` call does not exist in\n1.0. Always verify the runtime is `cloudfront-js-2.0`.\n\n## Step 4 — A\u002FB testing routing via KVS\n\nA\u002FB testing is the canonical KVS use case. The KVS stores the traffic\nsplit; the function reads it and routes accordingly. Changing the split\nis a KVS data update — no code redeployment needed.\n\n**KVS data schema for A\u002FB testing:**\n\n| Key | Value | Purpose |\n|---|---|---|\n| `ab-active` | `true` \u002F `false` | Master kill switch |\n| `ab-cohort` | `variant-a` \u002F `variant-b` | Which variant to route to |\n| `ab-percentage` | `0` to `100` | Percentage of traffic to variant-b |\n\nStep 4 percentage-based A\u002FB routing function code moved verbatim to [references\u002Fkvs-functions-integration.md](references\u002Fkvs-functions-integration.md).\nLoad it when writing the router function.\n\nStep 4 traffic-split change CLI (describe etag, put-key ab-percentage) moved verbatim to [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\nLoad it when rotating an A\u002FB split without redeployment.\n\n**Common mistake:** using `Math.random()` for traffic assignment instead\nof a deterministic hash. Random assignment bounces the same user between\nvariants on every request. Use a hash of a stable request property.\n\n## Step 5 — Feature flags via KVS\n\nStep 5 feature-flag pattern (schema, maintenance-mode\u002Fcheckout function code, toggle CLI, JSON-value mistake) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when provisioning feature flags.\n\n## Step 6 — IP allowlists \u002F blocklists via KVS\n\nStep 6 IP allowlist\u002Fblocklist pattern (schema, blocklist function code, CIDR limitation, KVS-vs-WAF table) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when provisioning edge IP filtering.\n\n## Step 7 — KVS size limits (1 MB store, key\u002Fvalue constraints)\n\nThe 1 MB total store limit is the most commonly hit constraint. Plan\nthe data schema to stay within limits.\n\n**Size budget calculation:**\n\n```text\nTotal store size = sum of (key_length + value_length) for all pairs\nMaximum = 1 MB (1,048,576 bytes)\n\n  100 keys × 20-char key × 100-char value  = ~12 KB   ✓\n  1,000 keys × 30-char key × 500-char value = ~530 KB  ✓\n  5,000 keys × 40-char key × 200-char value = ~1.2 MB  ✗ OVER\n```\n\n**Check current KVS size:**\n\n```bash\naws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --query 'Size'\n```\n\n**Size optimization strategies:**\n- Use short, abbreviated keys (`v2` instead of `api-version-2-flag`).\n- Store booleans as single chars (`1`\u002F`0` instead of `true`\u002F`false`).\n- Use prefix-based namespacing (`flg:checkout` instead of nested JSON).\n- Offload large data to S3; store only the pointer in KVS.\n- Split large datasets across multiple KVS stores (one per use case).\n\n## Step 8 — KVS propagation and eventual consistency\n\nKVS is eventually consistent (see the expert heuristic above for the\npropagation timeline). Key consistency characteristics:\n\n- **Read-your-writes:** NOT guaranteed. A write via CLI followed by an\n  immediate function read may return stale data.\n- **Monotonic reads:** Guaranteed. Once a PoP sees a new value, it will\n  never revert to an older value.\n- **Eventual convergence:** All PoPs converge within seconds to minutes.\n\n**When acceptable:** A\u002FB testing, feature flags, gradual rollouts.\n**When NOT acceptable:** security kill switches (use WAF), rate-limit\nthresholds (use WAF rate-based rules).\n\n## Step 9 — Recent features\n\nStep 9 recent features (KVS GA, cloudfront-js-2.0, IaC support, test-function KVS, CloudWatch metrics) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when using IaC or KVS metrics.\n\n## NEVER do these things\n\n1. **NEVER use the `cloudfront-js-1.0` runtime for KVS-enabled\n   functions.** The `cf.openKvs()` API exists ONLY in\n   `cloudfront-js-2.0`. A function created with 1.0 silently fails to\n   read KVS data. Always verify the runtime before publishing.\n\n2. **NEVER exceed the 1 MB total store size.** The hard limit includes\n   all keys, values, and metadata. `put-key` returns\n   `SizeLimitExceeded` when the store is full. Monitor `KvsSize` and\n   plan data schemas to stay within budget.\n\n3. **NEVER attempt to write to KVS from inside a CloudFront Function.**\n   Functions have READ-ONLY access to KVS. The `cf.openKvs()` handle\n   provides only `.get(key)`. All writes (put, delete) must go through\n   the AWS API (CLI, SDK, IaC).\n\n4. **NEVER reuse a stale etag for KVS mutations.** Every `put-key` and\n   `delete-key` requires the CURRENT etag. A stale etag returns\n   `PreconditionFailed`. Scripts must re-fetch the etag before each write.\n\n5. **NEVER deploy an unpublished function to production.** Functions in\n   `DEVELOPMENT` stage only run via `test-function`. You MUST call\n   `publish-function` before the function executes at the edge.\n\n6. **NEVER use KVS for security-critical instant-propagation rules.**\n   KVS is eventually consistent (seconds to minutes across PoPs). For\n   IP blocklists that must propagate instantly, use AWS WAF IP sets.\n\n7. **NEVER use `Math.random()` for A\u002FB test assignment.** Random\n   assignment causes the same user to bounce between variants on every\n   request. Use a deterministic hash of a stable request property.\n\n8. **NEVER assume KVS key matching is case-insensitive.** Keys are\n   case-SENSITIVE. `FeatureFlag` and `featureflag` are different keys.\n9. **NEVER link a KVS at the distribution level.** KVS is linked to\n   the FUNCTION, not the distribution.\n\n## Output format\n\n```text\nKVS_DEPLOYMENT: \u003Ckvs-name> (\u003Ckvs-arn>)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] KVS store: \u003Cname> — created | existing\n  [✓|✗] Store size: \u003Ccurrent-size> \u002F 1 MB (\u003Cpercentage>% used)\n  [✓|✗] Key count: \u003Ccount> keys\n  [✓|✗] Key schema: \u003Cconvention> (e.g., kebab-case with prefixes)\n  [✓|✗] Use case: A\u002FB testing | Feature flags | IP allowlist | Redirects | Custom\n  [✓|✗] Function name: \u003Cfunction-name>\n  [✓|✗] Function runtime: cloudfront-js-2.0 (REQUIRED for KVS)\n  [✓|✗] Function stage: LIVE (published) | DEVELOPMENT (unpublished)\n  [✓|✗] KVS-function link: associated via --key-value-store-associations\n  [✓|✗] Distribution: \u003Cdistribution-id> — viewer-request event\n  [✓|✗] Write path: CLI | SDK | IaC (Terraform\u002FCloudFormation)\n  [✓|✗] etag handling: re-fetch before each write | chain from response\n  [✓|✗] Propagation: eventual consistency acknowledged (seconds to minutes)\n  [✓|✗] Tags: \u003Ckey=value list>\nVERIFICATION_COMMANDS:\n  aws cloudfront-keyvaluestore describe-key-value-store --kvs-arn \u003Carn>\n  aws cloudfront-keyvaluestore list-keys --kvs-arn \u003Carn>\n  aws cloudfront describe-function --name \u003Cfunction-name>\n  aws cloudfront get-distribution-config --id \u003Cdistribution-id>\n```\n\n### Worked example — A\u002FB testing KVS with CloudFront Functions\n\n```text\nKVS_DEPLOYMENT: ab-testing-kvs (arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] KVS store: ab-testing-kvs — created\n  [✓] Store size: 156 bytes \u002F 1 MB (0.01% used)\n  [✓] Key count: 4 keys\n  [✓] Key schema: kebab-case with ab- prefix\n  [✓] Use case: A\u002FB testing\n  [✓] Function name: ab-test-router\n  [✓] Function runtime: cloudfront-js-2.0 (REQUIRED for KVS)\n  [✓] Function stage: LIVE (published)\n  [✓] KVS-function link: associated via --key-value-store-associations\n  [✓] Distribution: E1234567890ABC — viewer-request event\n  [✓] Write path: CLI (put-key for traffic-split changes)\n  [✓] etag handling: re-fetch before each write\n  [✓] Propagation: eventual consistency acknowledged (seconds to minutes)\n  [✓] Tags: Environment=production, UseCase=ab-testing\nVERIFICATION_COMMANDS:\n  aws cloudfront-keyvaluestore describe-key-value-store --kvs-arn arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123\n  aws cloudfront-keyvaluestore list-keys --kvs-arn arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123\n  aws cloudfront describe-function --name ab-test-router\n  aws cloudfront get-distribution-config --id E1234567890ABC\n```\n\n## Error handling\n\nError handling (SizeLimitExceeded, PreconditionFailed, undefined reads, silent edge failures, unpublished functions) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad it when a KVS deployment errors.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — KVS read-write asymmetry and etag concurrency heuristic, recent features moved from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — Step 5 feature-flag and Step 6 IP allowlist patterns moved from SKILL.md; the primary A\u002FB testing example stays in SKILL.md\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — KVS\u002FFunctions error catalog moved from SKILL.md\n- [references\u002Fkvs-functions-integration.md](references\u002Fkvs-functions-integration.md) — Functions KVS API detail (now also holds the Step 4 A\u002FB routing function code)\n- [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md) — copy-pasteable CLI sequence (now also holds the Step 4 traffic-split CLI)\n\n## Domain\n\nAWS CloudOps \u002F CloudFront Edge Computing & KeyValueStore Provisioning.\n\n## AWS documentation\n\n- **CloudFront KeyValueStore** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fkvs-with-functions.html\n- **CloudFront Functions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fcloudfront-functions.html\n- **cloudfront-js-2.0 runtime** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Ffunctions-javascript-runtime-2.0.html\n- **KVS API reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcloudfront\u002Flatest\u002FAPIReference\u002FAPI_o_KeyValueStore.html\n- **Terraform aws_cloudfront_key_value_store** — https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fcloudfront_key_value_store\n","# CloudFront KeyValueStore Deployer\n\nAn AWS CloudOps agent skill that provisions CloudFront KeyValueStore\n(KVS) with correct defaults. Walks the operator through KVS creation,\nkey-value pair management, CloudFront Functions integration, and\nuse-case patterns (A\u002FB testing, feature flags, IP allowlists), and\nemits a READY_TO_DEPLOY checklist with verification commands.\n\n## Activation keywords\n\ncreate CloudFront KeyValueStore, KVS CloudFront Functions, edge A\u002FB\ntesting, feature flags KVS, IP allowlist KVS, cf.openKvs,\ncloudfront-js-2.0 runtime, KVS propagation, KVS 1MB limit.\n\n## STRICT output contract\n\nWhen this skill is invoked with a CloudFront-KVS-provisioning request\n(KVS creation, Functions integration, A\u002FB testing, feature flags, IP\nallowlist, or a partial configuration), the agent MUST respond with the\nREADY_TO_DEPLOY checklist defined in the \"Output format\" section using\nthe literal all-caps labels `KVS_DEPLOYMENT:`, `VERDICT:`, `CHECKLIST:`,\nand `VERIFICATION_COMMANDS:`. Do NOT preface the checklist with prose,\nheadings, or disclaimers — emit the block as the first lines of the\nresponse. This contract is what assertion-based evals and downstream\nprovisioning pipelines rely on; deviating from the literal labels breaks\nautomation silently.\n\nIf any prerequisite is missing, the verdict is\n`PREREQUISITES_MISSING` with a specific gap citation in the checklist\n(marked `[✗]`), and `READY_TO_DEPLOY` MUST NOT also appear.\n\n## Quick navigation\n\n| Section | When to read |\n|---|---|\n| Prerequisites | Always — verify before provisioning |\n| Step 1 — KVS creation (store + key-value pairs) | Store setup |\n| Step 2 — Key-value pair management (put\u002Fget\u002Fdelete) | Data management |\n| Step 3 — CloudFront Functions integration (cf.openKvs) | Function linkage |\n| Step 4 — A\u002FB testing routing via KVS | Traffic splitting |\n| Step 5 — Feature flags via KVS | Flag toggles |\n| Step 6 — IP allowlists \u002F blocklists via KVS | Access control |\n| Step 7 — KVS size limits (1 MB store, key\u002Fvalue constraints) | Sizing |\n| Step 8 — KVS propagation and eventual consistency | Consistency model |\n| Step 9 — Recent features | Latest |\n| NEVER do these things | Review before signing off |\n| Output format | The literal checklist template |\n| references\u002Fkvs-functions-integration.md | Functions KVS API detail |\n| references\u002Fprovisioning-cli-commands.md | Copy-pasteable CLI sequence |\n\n## Mindset\n\n**One-line takeaway:** CloudFront KeyValueStore (KVS) is a managed key-\nvalue data store that CloudFront Functions read at the edge. It lets\nyou change routing, feature flags, IP lists, and redirect rules WITHOUT\nredeploying function code — update the KVS data and the change\npropagates to edge locations within seconds.\n\nThree misconceptions dominate KVS misdesign at provisioning time:\n\n- **\"I can store large datasets in KVS.\"** You cannot. The total store\n  size is limited to 1 MB (including keys, values, and metadata). KVS is\n  for small, high-velocity configuration data — not a general-purpose\n  database. Exceeding 1 MB returns `SizeLimitExceeded`.\n\n- **\"KVS updates are instantly visible at every edge.\"** They are not.\n  KVS is eventually consistent. Updates propagate to edge locations\n  within seconds to minutes. Functions at different PoPs may read stale\n  data briefly. If you need immediate consistency, KVS is the wrong tool.\n\n- **\"I can write to KVS from inside a CloudFront Function.\"** You\n  cannot. Functions have READ-ONLY access to KVS. All writes (put-key,\n  delete-key) happen via the AWS API (CLI, SDK, Console, IaC). The\n  function reads; the operator writes.\n\n## Configuration dependency graph (novel heuristic)\n\nKVS configurations are NOT independent. The function runtime, KVS\nassociation, and data schema interact in ways that silently break at\nthe edge. Use this graph both to sequence provisioning and to debug\n\"why isn't my function reading the KVS?\" later.\n\n| Configuration | Hard dependencies (API error without) | Silent failure \u002F immutability | Enables downstream |\n|---|---|---|---|\n| KVS store | none — `create-key-value-store` | store name is immutable after creation (must delete + recreate to rename) | key-value pairs |\n| Key-value pairs | KVS store exists (`--kvs-arn`) | total store size MUST stay under 1 MB (keys + values); `SizeLimitExceeded` on overflow | edge reads from Functions |\n| Function runtime | `cloudfront-js-2.0` (required for KVS API) | `cloudfront-js-1.0` does NOT support `cf.openKvs()` — function silently fails | KVS read access |\n| Function-KVS link | function `FunctionConfig.Runtime` = `cloudfront-js-2.0` | KVS is associated at function level, NOT at distribution level; unlinked function gets `null` from `openKvs()` | edge data lookup |\n| Distribution association | function exists + published (`PublishFunction`) | unpublished functions (`DEVELOPMENT` stage) are NOT invoked at the edge; test with `TestFunction` first | live edge execution |\n| KVS data schema | consistent key naming across all edge locations | inconsistent key casing (`userID` vs `userId`) causes `get()` to return `undefined` silently | correct routing decisions |\n| etag (concurrency) | `--if-match \u003Cetag>` for all updates | stale etag → `PreconditionFailed`; always re-fetch etag before update | safe concurrent writes |\n\n**The runtime and etag rows are the ones a baseline model misses.** A\nfunction created with `cloudfront-js-1.0` cannot read KVS — the\n`cf.openKvs()` call does not exist in that runtime. And every KVS\nupdate requires the current etag; a stale etag silently fails.\n\n**Cross-dependency gotchas:**\n- The function runtime MUST be `cloudfront-js-2.0` for KVS access.\n- KVS is linked to the FUNCTION, not the distribution. Multiple\n  distributions can use the same function (and thus the same KVS).\n- The function must be PUBLISHED (`PublishFunction`) before it executes\n  at the edge. A function in `DEVELOPMENT` stage runs only in tests.\n- KVS data is eventually consistent. Do not use KVS for time-critical\n  kill switches that must be instant across all PoPs.\n- The etag changes on every KVS update. Scripts that batch-update keys\n  must re-fetch the etag between each `put-key` call.\n\n## Expert heuristic: KVS read-write asymmetry and etag concurrency\n\nExpert heuristic on KVS read-write asymmetry and etag concurrency (write path vs read path, A\u002FB rotation pattern, etag chaining, propagation window) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when planning KVS updates or debugging stale reads.\n\n## Prerequisites (verify before provisioning)\n\nBefore emitting provisioning commands, verify these prerequisites.\nIf any are missing, the verdict is **PREREQUISITES_MISSING** with a\nspecific gap citation.\n\n| Prerequisite | Why it matters | How to verify |\n|---|---|---|\n| AWS account with CloudFront access | Can't provision without it | `aws sts get-caller-identity` |\n| KVS data size under 1 MB | Hard limit; `SizeLimitExceeded` on overflow | Estimate total key+value bytes |\n| Function runtime `cloudfront-js-2.0` | KVS API (`cf.openKvs`) requires this runtime | Check function config |\n| CloudFront distribution exists | KVS + Function are attached to a distribution | `aws cloudfront list-distributions` |\n| KVS key naming convention | Inconsistent casing causes silent `undefined` reads | Define and document key schema |\n| Write path identified (CLI\u002FSDK\u002FIaC) | Functions cannot write to KVS | Confirm update mechanism |\n| etag handling in update scripts | Stale etag → `PreconditionFailed` | Script must re-fetch or chain etags |\n\n## Step 1 — KVS creation (store + key-value pairs)\n\nThe first step is creating the KVS store. The store is a container for\nkey-value pairs. Once created, you populate it with data.\n\n**Create the KVS store:**\n\n```bash\nKVS_ARN=$(aws cloudfront create-key-value-store \\\n  --name \"ab-testing-kvs\" \\\n  --comment \"A\u002FB testing traffic split configuration\" \\\n  --query 'KeyValueStore.ARN' --output text)\n\necho \"KVS ARN: $KVS_ARN\"\n```\n\n**KVS store attributes:**\n- `name`: immutable after creation. To rename, delete and recreate.\n- `comment`: mutable via `update-key-value-store`.\n- `status`: `READY` when the store is available for reads.\n- `size`: current size in bytes (must stay under 1 MB).\n- `itemCount`: number of key-value pairs.\n- `etag`: concurrency token; changes on every mutation.\n\n**Retrieve the KVS etag (required for all writes):**\n\n```bash\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --query 'ETag' --output text)\n```\n\n**Common mistake:** creating the KVS with a generic name like \"kvs1\"\nand later needing to rename it. The name is immutable — choose a\ndescriptive name reflecting the use case.\n\n## Step 2 — Key-value pair management (put\u002Fget\u002Fdelete)\n\nKey-value pairs are managed via the `cloudfront-keyvaluestore` API\nnamespace (separate from the `cloudfront` namespace for store creation).\n\n**Put a key:**\n\n```bash\n# Re-fetch etag before each write (etag changes on every mutation)\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" --query 'ETag' --output text)\n\naws cloudfront-keyvaluestore put-key \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --key \"traffic-split\" \\\n  --value \"variant-b\" \\\n  --if-match \"$ETAG\"\n```\n\n**List all keys:**\n\n```bash\naws cloudfront-keyvaluestore list-keys \\\n  --kvs-arn \"$KVS_ARN\"\n```\n\n**Delete a key:**\n\n```bash\nETAG=$(aws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" --query 'ETag' --output text)\n\naws cloudfront-keyvaluestore delete-key \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --key \"traffic-split\" \\\n  --if-match \"$ETAG\"\n```\n\n**Key-value constraints:**\n- Key length: up to 512 characters.\n- Value length: up to 3 KB (3072 bytes) per value.\n- Total store size: 1 MB maximum (all keys + values combined).\n- Key characters: alphanumeric, hyphens, underscores, periods, colons,\n  forward slashes. No spaces.\n- Key matching is case-SENSITIVE. `UserID` and `userId` are different keys.\n\n**Common mistake:** using inconsistent key casing across the write path\n(CLI) and read path (function). The CLI writes `traffic-split` but the\nfunction reads `TrafficSplit`. The `get()` returns `undefined` silently.\n\n## Step 3 — CloudFront Functions integration (cf.openKvs)\n\nThe KVS is read by a CloudFront Function at the edge. The function\nmust use the `cloudfront-js-2.0` runtime and link to the KVS.\n\n**Create a CloudFront Function with KVS access:**\n\n```bash\n# function.js — reads KVS at the edge\ncat > function.js \u003C\u003C 'EOF'\nimport cf from 'cloudfront';\n\nconst kvs = cf.openKvs();  \u002F\u002F opens the KVS linked to this function\n\nfunction handler(event) {\n    const request = event.request;\n    const cohort = kvs.get('traffic-split');\n\n    if (cohort === 'variant-b') {\n        request.uri = request.uri.replace('\u002Fapi\u002F', '\u002Fapi-v2\u002F');\n    }\n    return request;\n}\nEOF\n\naws cloudfront create-function \\\n  --name \"ab-test-router\" \\\n  --function-config '{\"Comment\":\"A\u002FB test router via KVS\",\"Runtime\":\"cloudfront-js-2.0\"}' \\\n  --function-code fileb:\u002F\u002Ffunction.js \\\n  --key-value-store-associations '[\"'\"$KVS_ARN\"'\"]'\n```\n\n**Publish the function (required for edge execution):**\n\n```bash\naws cloudfront publish-function \\\n  --name \"ab-test-router\" \\\n  --if-match \"$FUNCTION_ETAG\"\n```\n\n**Associate the function with a distribution:**\n\n```bash\naws cloudfront update-distribution \\\n  --id \"$DIST_ID\" \\\n  --if-match \"$DIST_ETAG\" \\\n  --distribution-config '{\n    ...,\n    \"DefaultCacheBehavior\": {\n      ...,\n      \"FunctionAssociations\": {\n        \"Quantity\": 1,\n        \"Items\": [{\n          \"FunctionARN\": \"arn:aws:cloudfront::123456789012:function\u002Fab-test-router\",\n          \"EventType\": \"viewer-request\"\n        }]\n      }\n    }\n  }'\n```\n\n**Critical integration rules:**\n- The function runtime MUST be `cloudfront-js-2.0`. The `cloudfront-js-1.0`\n  runtime does NOT have the `cf.openKvs()` API.\n- The KVS is linked to the FUNCTION via `--key-value-store-associations`,\n  NOT at the distribution level.\n- The function must be PUBLISHED before edge execution. Unpublished\n  functions (`DEVELOPMENT` stage) only run in `test-function`.\n- `EventType` is typically `viewer-request` for routing\u002Fredirect logic.\n\n**Common mistake:** creating the function with the default\n`cloudfront-js-1.0` runtime. The `cf.openKvs()` call does not exist in\n1.0. Always verify the runtime is `cloudfront-js-2.0`.\n\n## Step 4 — A\u002FB testing routing via KVS\n\nA\u002FB testing is the canonical KVS use case. The KVS stores the traffic\nsplit; the function reads it and routes accordingly. Changing the split\nis a KVS data update — no code redeployment needed.\n\n**KVS data schema for A\u002FB testing:**\n\n| Key | Value | Purpose |\n|---|---|---|\n| `ab-active` | `true` \u002F `false` | Master kill switch |\n| `ab-cohort` | `variant-a` \u002F `variant-b` | Which variant to route to |\n| `ab-percentage` | `0` to `100` | Percentage of traffic to variant-b |\n\nStep 4 percentage-based A\u002FB routing function code moved verbatim to [references\u002Fkvs-functions-integration.md](references\u002Fkvs-functions-integration.md).\nLoad it when writing the router function.\n\nStep 4 traffic-split change CLI (describe etag, put-key ab-percentage) moved verbatim to [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md).\nLoad it when rotating an A\u002FB split without redeployment.\n\n**Common mistake:** using `Math.random()` for traffic assignment instead\nof a deterministic hash. Random assignment bounces the same user between\nvariants on every request. Use a hash of a stable request property.\n\n## Step 5 — Feature flags via KVS\n\nStep 5 feature-flag pattern (schema, maintenance-mode\u002Fcheckout function code, toggle CLI, JSON-value mistake) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when provisioning feature flags.\n\n## Step 6 — IP allowlists \u002F blocklists via KVS\n\nStep 6 IP allowlist\u002Fblocklist pattern (schema, blocklist function code, CIDR limitation, KVS-vs-WAF table) moved verbatim to [references\u002Fworked-examples.md](references\u002Fworked-examples.md).\nLoad it when provisioning edge IP filtering.\n\n## Step 7 — KVS size limits (1 MB store, key\u002Fvalue constraints)\n\nThe 1 MB total store limit is the most commonly hit constraint. Plan\nthe data schema to stay within limits.\n\n**Size budget calculation:**\n\n```text\nTotal store size = sum of (key_length + value_length) for all pairs\nMaximum = 1 MB (1,048,576 bytes)\n\n  100 keys × 20-char key × 100-char value  = ~12 KB   ✓\n  1,000 keys × 30-char key × 500-char value = ~530 KB  ✓\n  5,000 keys × 40-char key × 200-char value = ~1.2 MB  ✗ OVER\n```\n\n**Check current KVS size:**\n\n```bash\naws cloudfront-keyvaluestore describe-key-value-store \\\n  --kvs-arn \"$KVS_ARN\" \\\n  --query 'Size'\n```\n\n**Size optimization strategies:**\n- Use short, abbreviated keys (`v2` instead of `api-version-2-flag`).\n- Store booleans as single chars (`1`\u002F`0` instead of `true`\u002F`false`).\n- Use prefix-based namespacing (`flg:checkout` instead of nested JSON).\n- Offload large data to S3; store only the pointer in KVS.\n- Split large datasets across multiple KVS stores (one per use case).\n\n## Step 8 — KVS propagation and eventual consistency\n\nKVS is eventually consistent (see the expert heuristic above for the\npropagation timeline). Key consistency characteristics:\n\n- **Read-your-writes:** NOT guaranteed. A write via CLI followed by an\n  immediate function read may return stale data.\n- **Monotonic reads:** Guaranteed. Once a PoP sees a new value, it will\n  never revert to an older value.\n- **Eventual convergence:** All PoPs converge within seconds to minutes.\n\n**When acceptable:** A\u002FB testing, feature flags, gradual rollouts.\n**When NOT acceptable:** security kill switches (use WAF), rate-limit\nthresholds (use WAF rate-based rules).\n\n## Step 9 — Recent features\n\nStep 9 recent features (KVS GA, cloudfront-js-2.0, IaC support, test-function KVS, CloudWatch metrics) moved verbatim to [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md).\nLoad on demand when using IaC or KVS metrics.\n\n## NEVER do these things\n\n1. **NEVER use the `cloudfront-js-1.0` runtime for KVS-enabled\n   functions.** The `cf.openKvs()` API exists ONLY in\n   `cloudfront-js-2.0`. A function created with 1.0 silently fails to\n   read KVS data. Always verify the runtime before publishing.\n\n2. **NEVER exceed the 1 MB total store size.** The hard limit includes\n   all keys, values, and metadata. `put-key` returns\n   `SizeLimitExceeded` when the store is full. Monitor `KvsSize` and\n   plan data schemas to stay within budget.\n\n3. **NEVER attempt to write to KVS from inside a CloudFront Function.**\n   Functions have READ-ONLY access to KVS. The `cf.openKvs()` handle\n   provides only `.get(key)`. All writes (put, delete) must go through\n   the AWS API (CLI, SDK, IaC).\n\n4. **NEVER reuse a stale etag for KVS mutations.** Every `put-key` and\n   `delete-key` requires the CURRENT etag. A stale etag returns\n   `PreconditionFailed`. Scripts must re-fetch the etag before each write.\n\n5. **NEVER deploy an unpublished function to production.** Functions in\n   `DEVELOPMENT` stage only run via `test-function`. You MUST call\n   `publish-function` before the function executes at the edge.\n\n6. **NEVER use KVS for security-critical instant-propagation rules.**\n   KVS is eventually consistent (seconds to minutes across PoPs). For\n   IP blocklists that must propagate instantly, use AWS WAF IP sets.\n\n7. **NEVER use `Math.random()` for A\u002FB test assignment.** Random\n   assignment causes the same user to bounce between variants on every\n   request. Use a deterministic hash of a stable request property.\n\n8. **NEVER assume KVS key matching is case-insensitive.** Keys are\n   case-SENSITIVE. `FeatureFlag` and `featureflag` are different keys.\n9. **NEVER link a KVS at the distribution level.** KVS is linked to\n   the FUNCTION, not the distribution.\n\n## Output format\n\n```text\nKVS_DEPLOYMENT: \u003Ckvs-name> (\u003Ckvs-arn>)\nVERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING\nCHECKLIST:\n  [✓|✗] KVS store: \u003Cname> — created | existing\n  [✓|✗] Store size: \u003Ccurrent-size> \u002F 1 MB (\u003Cpercentage>% used)\n  [✓|✗] Key count: \u003Ccount> keys\n  [✓|✗] Key schema: \u003Cconvention> (e.g., kebab-case with prefixes)\n  [✓|✗] Use case: A\u002FB testing | Feature flags | IP allowlist | Redirects | Custom\n  [✓|✗] Function name: \u003Cfunction-name>\n  [✓|✗] Function runtime: cloudfront-js-2.0 (REQUIRED for KVS)\n  [✓|✗] Function stage: LIVE (published) | DEVELOPMENT (unpublished)\n  [✓|✗] KVS-function link: associated via --key-value-store-associations\n  [✓|✗] Distribution: \u003Cdistribution-id> — viewer-request event\n  [✓|✗] Write path: CLI | SDK | IaC (Terraform\u002FCloudFormation)\n  [✓|✗] etag handling: re-fetch before each write | chain from response\n  [✓|✗] Propagation: eventual consistency acknowledged (seconds to minutes)\n  [✓|✗] Tags: \u003Ckey=value list>\nVERIFICATION_COMMANDS:\n  aws cloudfront-keyvaluestore describe-key-value-store --kvs-arn \u003Carn>\n  aws cloudfront-keyvaluestore list-keys --kvs-arn \u003Carn>\n  aws cloudfront describe-function --name \u003Cfunction-name>\n  aws cloudfront get-distribution-config --id \u003Cdistribution-id>\n```\n\n### Worked example — A\u002FB testing KVS with CloudFront Functions\n\n```text\nKVS_DEPLOYMENT: ab-testing-kvs (arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123)\nVERDICT: READY_TO_DEPLOY\nCHECKLIST:\n  [✓] KVS store: ab-testing-kvs — created\n  [✓] Store size: 156 bytes \u002F 1 MB (0.01% used)\n  [✓] Key count: 4 keys\n  [✓] Key schema: kebab-case with ab- prefix\n  [✓] Use case: A\u002FB testing\n  [✓] Function name: ab-test-router\n  [✓] Function runtime: cloudfront-js-2.0 (REQUIRED for KVS)\n  [✓] Function stage: LIVE (published)\n  [✓] KVS-function link: associated via --key-value-store-associations\n  [✓] Distribution: E1234567890ABC — viewer-request event\n  [✓] Write path: CLI (put-key for traffic-split changes)\n  [✓] etag handling: re-fetch before each write\n  [✓] Propagation: eventual consistency acknowledged (seconds to minutes)\n  [✓] Tags: Environment=production, UseCase=ab-testing\nVERIFICATION_COMMANDS:\n  aws cloudfront-keyvaluestore describe-key-value-store --kvs-arn arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123\n  aws cloudfront-keyvaluestore list-keys --kvs-arn arn:aws:cloudfront::123456789012:key-value-store\u002Fabc-123\n  aws cloudfront describe-function --name ab-test-router\n  aws cloudfront get-distribution-config --id E1234567890ABC\n```\n\n## Error handling\n\nError handling (SizeLimitExceeded, PreconditionFailed, undefined reads, silent edge failures, unpublished functions) moved verbatim to [references\u002Ferror-handling.md](references\u002Ferror-handling.md).\nLoad it when a KVS deployment errors.\n\n## References (load on demand)\n\n- [references\u002Fadvanced-patterns.md](references\u002Fadvanced-patterns.md) — KVS read-write asymmetry and etag concurrency heuristic, recent features moved from SKILL.md\n- [references\u002Fworked-examples.md](references\u002Fworked-examples.md) — Step 5 feature-flag and Step 6 IP allowlist patterns moved from SKILL.md; the primary A\u002FB testing example stays in SKILL.md\n- [references\u002Ferror-handling.md](references\u002Ferror-handling.md) — KVS\u002FFunctions error catalog moved from SKILL.md\n- [references\u002Fkvs-functions-integration.md](references\u002Fkvs-functions-integration.md) — Functions KVS API detail (now also holds the Step 4 A\u002FB routing function code)\n- [references\u002Fprovisioning-cli-commands.md](references\u002Fprovisioning-cli-commands.md) — copy-pasteable CLI sequence (now also holds the Step 4 traffic-split CLI)\n\n## Domain\n\nAWS CloudOps \u002F CloudFront Edge Computing & KeyValueStore Provisioning.\n\n## AWS documentation\n\n- **CloudFront KeyValueStore** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fkvs-with-functions.html\n- **CloudFront Functions** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Fcloudfront-functions.html\n- **cloudfront-js-2.0 runtime** — https:\u002F\u002Fdocs.aws.amazon.com\u002FAmazonCloudFront\u002Flatest\u002FDeveloperGuide\u002Ffunctions-javascript-runtime-2.0.html\n- **KVS API reference** — https:\u002F\u002Fdocs.aws.amazon.com\u002Fcloudfront\u002Flatest\u002FAPIReference\u002FAPI_o_KeyValueStore.html\n- **Terraform aws_cloudfront_key_value_store** — https:\u002F\u002Fregistry.terraform.io\u002Fproviders\u002Fhashicorp\u002Faws\u002Flatest\u002Fdocs\u002Fresources\u002Fcloudfront_key_value_store\n",{"name":5,"license":15,"metadata":24,"description":7,"compatibility":41},{"tags":25,"phase":26,"author":27,"domain":28,"family":29,"version":30,"keywords":31,"task_type":32,"complexity":33,"entry_point":34,"skill_class":35,"when_to_use":36,"dependencies":37,"requires_llm":38,"verdict_shape":39,"lifecycle_status":40,"supports_pipeline":38},"aws, cloudfront, keyvaluestore, cloudfront-functions, networking, cloudops, deploy, edge-computing, provisioning, feature-flags, ab-testing","1","Jacky Chan — AWS Community Builder","aws-cloudops","Networking","0.1.0","aws, cloudfront, keyvaluestore, kvs, cloudfront functions, edge computing, cloudops, deploy, provisioning, a\u002Fb testing, feature flags, ip allowlist, ip blocklist, url redirect, edge routing, cloudfront-js-2.0, cf.openkvs, eventual consistency","deploy","medium","false","capability","Invoke when the user wants to create a CloudFront KeyValueStore (KVS), integrate CloudFront Functions with KVS for edge-side data lookup, implement A\u002FB testing or canary routing at the CDN edge, deploy feature flags that toggle without function redeployment, build IP allowlist or blocklist logic in CloudFront Functions, or drive URL redirects\u002Frewrites from externally managed key-value data. Do NOT invoke for Lambda@Edge (different runtime, no KVS access), for CloudFront origin failover (use origin groups, not KVS), for caching behavior changes (use cache policies, not KVS), or for auditing existing CloudFront distributions (use cloudfront-distribution-auditor).","aws-orchestrator","true","READY_TO_DEPLOY | PREREQUISITES_MISSING","active","Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with cloudfront and cloudfront-keyvaluestore access. Works with Terraform aws_cloudfront_key_value_store \u002F aws_cloudfront_function resources and CloudFormation AWS::CloudFront::KeyValueStore templates.","main","eeace51bd5dd1db2030729d83eeab988861553aa","skills\u002Fcloudfront-keyvaluestore-deployer",0,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills","https:\u002F\u002Fgithub.com\u002Fjhkchan","CTO & Co-Founder @Beever-AI  & @votee. CAISP. AWS Community Builder. Organizer@GDGCloudHK. MongoDB Champion. Technopreneur + Infornographer.","2026-09-24 08:54:10",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add jhkchan\u002Faws-agent-skills --skill cloudfront-keyvaluestore-deployer",{"tool":56,"command":57},"bunx","bunx skills add jhkchan\u002Faws-agent-skills --skill cloudfront-keyvaluestore-deployer",{"tool":59,"command":60},"pnpm","pnpm dlx skills add jhkchan\u002Faws-agent-skills --skill cloudfront-keyvaluestore-deployer","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002FSKILL.md",true,[64,70,74,78,82,86,90,94,98,102,106,110,114,118,122,126,130,134,138,142],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"eval\u002Ftest-cases.yaml","REFERENCE","参考文档",5375,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Feval\u002Ftest-cases.yaml",{"path":71,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":72,"sourceHtmlUrl":73},"evals\u002Fbaselines\u002Fab-testing-kvs-function.md",816,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fbaselines\u002Fab-testing-kvs-function.md",{"path":75,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":76,"sourceHtmlUrl":77},"evals\u002Fbaselines\u002Ffeature-flags-kvs.md",623,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fbaselines\u002Ffeature-flags-kvs.md",{"path":79,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":80,"sourceHtmlUrl":81},"evals\u002Fbaselines\u002Fip-allowlist-kvs.md",736,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fbaselines\u002Fip-allowlist-kvs.md",{"path":83,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":84,"sourceHtmlUrl":85},"evals\u002Fbaselines\u002Fkvs-size-limit-exceeded.md",756,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fbaselines\u002Fkvs-size-limit-exceeded.md",{"path":87,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":88,"sourceHtmlUrl":89},"evals\u002Fbaselines\u002Fwrong-runtime-js-1.md",673,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fbaselines\u002Fwrong-runtime-js-1.md",{"path":91,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":92,"sourceHtmlUrl":93},"evals\u002Feval_config.yaml",1734,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Feval_config.yaml",{"path":95,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":96,"sourceHtmlUrl":97},"evals\u002Fevals.json",12218,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fevals.json",{"path":99,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":100,"sourceHtmlUrl":101},"evals\u002Fprompts\u002Fab-testing-kvs-function.md",629,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fprompts\u002Fab-testing-kvs-function.md",{"path":103,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":104,"sourceHtmlUrl":105},"evals\u002Fprompts\u002Ffeature-flags-kvs.md",507,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fprompts\u002Ffeature-flags-kvs.md",{"path":107,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":108,"sourceHtmlUrl":109},"evals\u002Fprompts\u002Fip-allowlist-kvs.md",505,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fprompts\u002Fip-allowlist-kvs.md",{"path":111,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":112,"sourceHtmlUrl":113},"evals\u002Fprompts\u002Fkvs-size-limit-exceeded.md",459,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fprompts\u002Fkvs-size-limit-exceeded.md",{"path":115,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":116,"sourceHtmlUrl":117},"evals\u002Fprompts\u002Fwrong-runtime-js-1.md",473,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fevals\u002Fprompts\u002Fwrong-runtime-js-1.md",{"path":119,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":120,"sourceHtmlUrl":121},"examples\u002FREADME.md",6013,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fexamples\u002FREADME.md",{"path":123,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":124,"sourceHtmlUrl":125},"references\u002Fadvanced-patterns.md",3282,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Freferences\u002Fadvanced-patterns.md",{"path":127,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":128,"sourceHtmlUrl":129},"references\u002Ferror-handling.md",1015,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Freferences\u002Ferror-handling.md",{"path":131,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":132,"sourceHtmlUrl":133},"references\u002Fkvs-functions-integration.md",8481,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Freferences\u002Fkvs-functions-integration.md",{"path":135,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":136,"sourceHtmlUrl":137},"references\u002Fprovisioning-cli-commands.md",9204,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Freferences\u002Fprovisioning-cli-commands.md",{"path":139,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":140,"sourceHtmlUrl":141},"references\u002Fworked-examples.md",3722,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Freferences\u002Fworked-examples.md",{"path":143,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":144,"sourceHtmlUrl":145},"skill.usf.yaml",4459,"https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcloudfront-keyvaluestore-deployer\u002Fskill.usf.yaml",[147,154,161,168,175,182],{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":19},"01M7ADVD60X4PCAPKSE58P9NDC","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 \u002F method \u002F 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 \u002F 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 \u002F EKS \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fxray-tracing-deployer\u002FSKILL.md",[],[],{"skillNo":155,"name":156,"nameZh":6,"description":157,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":19},"01M7ADTVJ7DCBM9CB1FY51GH7J","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-workload-auditor\u002FSKILL.md",[],[],{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":19},"01M7ADT59G6FTTNZYHT2QRPNNP","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 \u002F 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwellarchitected-review-operator\u002FSKILL.md",[],[],{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":174,"publishedAt":19},"01M7ADSH5JA9QHNPPHQCD7EVA7","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\u002FAPI Gateway\u002FCloudFront, or configuring CAPTCHA\u002FChallenge 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-deployer\u002FSKILL.md",[],[],{"skillNo":176,"name":177,"nameZh":6,"description":178,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":179,"categories":180,"keywords":181,"publishedAt":19},"01M7ADRYFAT8R73FBNCHRC573X","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\u002Fbypass 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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwafv2-web-acl-auditor\u002FSKILL.md",[],[],{"skillNo":183,"name":184,"nameZh":6,"description":185,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":186,"categories":187,"keywords":188,"publishedAt":19},"01M7ADR8W7G72JX4KFGN03QK8Q","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.","https:\u002F\u002Fgithub.com\u002Fjhkchan\u002Faws-agent-skills\u002Fblob\u002Fmain\u002Fskills\u002Fwaf-rule-deployer\u002FSKILL.md",[],[]]