ElastiCache Cache Deployer
An AWS CloudOps agent skill that provisions ElastiCache (Redis OSS /
Memcached) clusters with correct defaults. The skill walks the operator
through a 10-step provisioning procedure, captures the operator's
engine, topology, security, and capacity decisions, explains why each
default matters, and emits a READY_TO_DEPLOY checklist with
copy-pasteable verification commands.
Activation keywords
create ElastiCache, provision Redis, provision Memcached, ElastiCache
deployment, replication group, cluster mode enabled, cluster mode
disabled, Multi-AZ Redis, automatic failover, encryption at rest,
encryption in transit, AUTH token, TLS, subnet group, parameter group,
maxmemory-policy, allkeys-lru, noeviction, snapshot retention,
Global Datastore, ElastiCache Serverless, Outposts, cache node type,
cache.t3, cache.r6g, cache.x2g.
Invocation contract (hard requirement)
When this skill is invoked with a cache-provisioning request (cluster
name, engine choice, 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 CACHE:, 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
One-line takeaway: ElastiCache correctness is decided at creation
time. Engine choice (Redis vs Memcached), cluster-mode topology, node
type, and the Multi-AZ + encryption bundle are impossible or disruptive
to change later — the provisioning procedure treats each as a one-way
door and forces an explicit decision before the create call.
Three misconceptions dominate ElastiCache misdesign at provisioning time:
Moved verbatim → references/advanced-patterns.md § "Mindset misconceptions".
Load when: you need the full argument behind the engine/cluster-mode/Multi-AZ misconceptions.
Quick navigation
| Section |
When to read |
| §"Prerequisites" |
Always — verify before provisioning |
| §"Step 1 — Engine selection" |
Picking Redis vs Memcached |
| §"Step 2 — Cluster mode decision" |
Single-shard vs sharded Redis |
| §"Step 3 — Node type sizing" |
Picking cache.t3 / r6g / x2g |
| §"Step 4 — Multi-AZ + failover" |
Production Redis topology |
| §"Step 5 — Network + security" |
VPC, subnet group, SG, ports |
| §"Step 6 — Encryption + AUTH + TLS" |
Redis-only security bundle |
| §"Step 7 — Parameter groups" |
maxmemory-policy, timeout |
| §"Step 8 — Snapshots / backups" |
Redis-only automated backups |
| §"Step 9 — Serverless / Global Datastore" |
Latest 2023-2026 features |
| §"Step 10 — CloudWatch alarms" |
Operational hygiene |
| §"NEVER do these things" |
Review before signing off |
| §"Output format" |
The literal checklist template |
| references/engine-and-topology.md |
Deep Redis-vs-Memcached + cluster-mode math |
| references/provisioning-cli-commands.md |
Copy-pasteable CLI sequence |
Reasoning framework (why provisioning order matters)
Moved verbatim → references/advanced-patterns.md § "Reasoning framework".
Load when: sequencing engine, cluster mode, encryption, subnet group, node type, and parameter decisions.
ElastiCache configuration dependency graph (novel heuristic)
ElastiCache configurations are NOT independent. Many are immutable
after creation, others silently downgrade. Use this graph both to
sequence provisioning and to debug "why can't I add this?" later.
| Configuration |
Hard dependencies (API error without) |
Silent failure / immutability |
Enables downstream |
| Engine (Redis / Memcached) |
none — create argument |
IMMUTABLE — migration = full cluster swap + client rewrite |
persistence, replication, clustering, encryption, pub/sub (Redis only) |
| Cluster mode (enabled / disabled) |
Redis engine |
IMMUTABLE for write scaling — switching disabled → enabled requires new group + cutover |
horizontal write scaling, up to 500 shards |
| Node type |
none — create argument |
changeable via modify with rolling node replacement (disconnects clients) |
memory budget, CPU, network |
| Multi-AZ with automatic failover |
Redis engine + subnet group spanning >=2 AZs + >=1 replica |
failover promoted only if replica is in a different AZ than primary |
primary-AZ-failure resilience |
| Number of replicas |
Redis engine |
0-5 per shard (cluster mode enabled); 0-5 total (cluster mode disabled) |
read scaling + failover |
| Encryption at rest |
Redis engine + must enable at creation |
CANNOT be added post-creation without dump-and-restore; Memcached: NOT supported |
compliance (PCI-DSS, HIPAA) |
| Encryption in transit (TLS) |
Redis engine + must enable at creation + AUTH token recommended |
can be enabled via modify with rolling replacement (client disconnects); Memcached: NOT supported |
TLS-only clients, network sniffing defense |
| AUTH token |
Redis engine + encryption in transit strongly recommended |
AUTH requires TLS — without TLS the token traverses network in plaintext |
password-protected Redis |
| Subnet group (CacheSubnetGroupName) |
VPC + >=1 subnet; >=2 AZs for Multi-AZ |
subnets CANNOT be removed once added; can only add |
VPC-only addressing |
| Security group |
VPC |
port 6379 (Redis) or 11211 (Memcached) inbound from application SG |
network isolation |
| Parameter group |
none — create argument |
changes apply on next reboot (parameter group modifications are not immediate) |
maxmemory-policy, timeout, tcp-keepalive |
| Snapshot retention (automated) |
Redis engine + snapshotRetentionLimit > 0 |
Memcached: NOT supported; restore creates a NEW cluster |
point-in-time recovery for Redis |
| Snapshot window |
Redis engine + snapshots enabled |
maintenance / snapshot windows must NOT overlap |
deterministic backup timing |
| Maintenance window |
none |
ElastiCache applies engine upgrades in this window |
controlled upgrade timing |
| Global Datastore |
Redis engine + cluster mode enabled + >=2 regions + each region's cluster already provisioned |
primary cluster must be cluster-mode-enabled; each region uses its own KMS key / node type |
cross-region low-latency reads, DR |
| ElastiCache Serverless |
none — separate API (create-serverless-cache) |
NOT compatible with cluster mode, Global Datastore, Outposts; VPC-only |
no capacity management, automatic scaling |
| Outposts |
Redis engine + Outpost in account |
subset of node types only; data residency constraint |
on-prem latency, data-sovereign workloads |
Moved verbatim → references/advanced-patterns.md § "Configuration dependency graph".
Load when: the immutability analysis and cross-dependency gotchas behind the table.
Expert heuristic: effective memory calculator
Moved verbatim → references/engine-and-topology.md § "Expert heuristic: effective memory calculator".
Load when: sizing real usable memory (Redis 50% rule vs Memcached 90%).
numbers.
Expert heuristic: cluster mode shard count estimator
Moved verbatim → references/engine-and-topology.md § "Expert heuristic: cluster mode shard count estimator".
Load when: computing shard count from sustained write rate (60% rule) and scenario shapes.
Expert heuristic: failover promotion semantics
Moved verbatim → references/engine-and-topology.md § "Expert heuristic: failover promotion semantics".
Load when: reasoning about promotion time, data-loss windows, and Memcached cross-az.
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 ElastiCache access |
Can't provision without it |
aws sts get-caller-identity |
| Region selected |
Cache nodes, subnet groups, snapshots are region-scoped |
aws configure get region |
| VPC ID + at least 2 subnets in different AZs (for Multi-AZ Redis) |
ElastiCache is VPC-only; Multi-AZ requires multi-AZ subnet group |
aws ec2 describe-subnets --filters "Name=vpc-id,Values=<vpc>" — confirm >=2 distinct AvailabilityZone values |
| Cluster name unique in this region |
Names are region-unique |
aws elasticache describe-replication-groups --replication-group-id <name> returns ReplicationGroupNotFound |
| KMS key ARN (if encryption at rest with customer CMK) |
Custom encryption requires a CMK in the same region |
aws kms describe-key --key-id <cmk-id> |
| Security group with correct port (6379 Redis / 11211 Memcached) inbound from application SG |
Network isolation; wrong port = silent connectivity failure |
aws ec2 describe-security-groups --group-ids <sg> — verify inbound rule on 6379 or 11211 |
| AUTH token strength (if Redis AUTH) |
Must be 16-128 chars, printable, non-whitespace |
Generate via openssl rand -base64 24 |
| Workload description (cache vs store, write rate, data size) |
Drives engine, cluster mode, node type, replica count, maxmemory-policy decisions |
Captured in the prompt or follow-up question |
If any prerequisite is missing, output VERDICT: PREREQUISITES_MISSING
and cite the specific gap.
10-step provisioning procedure
Step 1 — Engine selection (immutable — decide BEFORE create)
The engine decision is the highest-impact ElastiCache design choice
and is immutable without a full migration.
Decision tree:
Moved verbatim → references/engine-and-topology.md § "Step 1".
Load when: walking the Redis-vs-Memcached engine decision. The condensed tree lives in § Decision tree: Redis vs Memcached.
Moved verbatim → references/engine-and-topology.md § "Step 1".
Load when: comparing engines feature-by-feature or reviewing the Memcached migration mistake.
Step 2 — Cluster mode decision (immutable for write scaling — decide BEFORE create)
For Redis, cluster mode determines whether writes scale horizontally.
This is the second-highest-impact decision and is effectively
immutable without a full cluster migration.
Decision tree:
Moved verbatim → references/engine-and-topology.md § "Step 2".
Load when: walking the cluster-mode decision incl. MULTI/EXEC. The condensed tree lives in § Decision tree: Redis cluster mode enabled vs disabled.
Moved verbatim → references/engine-and-topology.md § "Step 2".
Load when: hash slots, CROSSSLOT limits, or the disabled→enabled migration mistake.
Step 3 — Node type sizing
ElastiCache offers cache.node-type families. Choose based on workload
shape.
Node family selection:
| Family |
Optimized for |
Use when |
cache.r7g, cache.r6g |
Memory |
General-purpose Redis; large datasets; production |
cache.x2g |
Memory (max) |
Very large datasets; dense packing |
cache.m7g, cache.m6g |
Balanced (memory + compute) |
Mixed workloads; mid-size datasets |
cache.c7g, cache.c6g |
Compute |
Computed-heavy (Lua scripts, SORT) |
cache.t4g, cache.t3 |
Burst |
Dev / test / low-traffic; non-production |
cache.t1, cache.m1, cache.m2 |
Legacy |
DO NOT USE — end-of-life |
Moved verbatim → references/engine-and-topology.md § "Step 3".
Load when: picking node families/sizes and applying the 50%/90% memory rules.
Step 4 — Multi-AZ + automatic failover (Redis only)
Multi-AZ with automatic failover is the primary resilience control for
Redis. Memcached does NOT support Multi-AZ.
Moved verbatim → references/engine-and-topology.md § "Step 4".
Load when: checking the five gating requirements for Multi-AZ failover.
Moved verbatim → references/engine-and-topology.md § "Step 4".
Load when: promotion flow, endpoint behavior, or AZ topology examples.
Step 5 — Network + security (VPC, subnet group, security group)
ElastiCache is VPC-only — there is no public IP option (unlike
RDS). All clusters live inside a VPC.
Subnet group creation:
Moved verbatim → references/provisioning-cli-commands.md § "Step 5".
Load when: creating the multi-AZ cache subnet group.
Verify the subnets span >=2 AZs:
Moved verbatim → references/provisioning-cli-commands.md § "Step 5".
Load when: verifying the subnet group spans >=2 AZs before create.
Security group rules:
Moved verbatim → references/provisioning-cli-commands.md § "Step 5".
Load when: opening port 6379/11211 inbound from the application SG.
NEVER open the cache port to 0.0.0.0/0 — even with AUTH, this
exposes the cluster to internet scanning. Always scope inbound to the
application's SG.
Moved verbatim → references/advanced-patterns.md § "Step 5".
Load when: the cluster is unreachable or the SG was not attached at creation.
Step 6 — Encryption + AUTH + TLS (Redis only)
Encryption and AUTH are Redis-only. Memcached has NO encryption
support — if compliance requires encryption, the answer is Redis.
Encryption at rest:
Moved verbatim → references/advanced-patterns.md § "Step 6".
Load when: using a customer CMK or adding encryption to an existing cluster.
Encryption in transit (TLS):
Moved verbatim → references/advanced-patterns.md § "Step 6".
Load when: enabling TLS post-creation or reasoning about rolling replacement.
AUTH token:
Moved verbatim → references/advanced-patterns.md § "Step 6".
Load when: generating and applying the Redis AUTH token.
Moved verbatim → references/advanced-patterns.md § "Step 6".
Load when: using ACL user groups or pairing AUTH with TLS.
Step 7 — Parameter groups (maxmemory-policy, timeout)
Parameter groups control Redis / Memcached runtime behavior. Changes
apply on next reboot (not immediate).
Redis maxmemory-policy decision (load-bearing):
| Policy |
Behavior when memory fills |
Use when |
allkeys-lru |
Evict least-recently-used key |
General cache (data is disposable; LRU is optimal) |
allkeys-lfu |
Evict least-frequently-used key |
Cache with skewed access (long-tail popular keys) |
volatile-lru |
Evict LRU among keys with TTL only |
Mixed store + cache (TTL'd items evicted, persistent kept) |
volatile-ttl |
Evict closest-to-expiry TTL'd key |
Priority-based cache (soon-to-expire items go first) |
noeviction |
Return OOM error on writes |
Session store, persistent store (NEVER silently evict) |
allkeys-random |
Evict random key |
Uniform-access cache (rarely optimal) |
volatile-random |
Evict random TTL'd key |
Rare; use volatile-lru instead |
Decision rule:
Moved verbatim → references/engine-and-topology.md § "Step 7".
Load when: mapping cache vs store vs mix workloads to a policy.
with TTL on disposable keys.
Moved verbatim → references/provisioning-cli-commands.md § "Step 7".
Load when: setting non-maxmemory parameters for Redis or Memcached.
Step 8 — Snapshots / backups (Redis only)
Redis supports automated snapshots (RDB files) for point-in-time
recovery. Memcached does NOT support snapshots.
Enable automated snapshots at creation:
Moved verbatim → references/provisioning-cli-commands.md § "Step 8".
Load when: enabling snapshot retention/window at creation.
Moved verbatim → references/provisioning-cli-commands.md § "Step 8".
Load when: choosing retention days and windows.
Manual snapshot:
Moved verbatim → references/provisioning-cli-commands.md § "Step 8".
Load when: taking an on-demand snapshot.
Restore from snapshot creates a NEW cluster:
Moved verbatim → references/provisioning-cli-commands.md § "Step 8".
Load when: restoring a replication group from a snapshot ARN.
Common mistake: setting retention limit to 0 (snapshots disabled).
For production Redis, set retention 7-35 days. For dev, 1-3 days is fine.
Step 9 — ElastiCache Serverless / Global Datastore (latest features)
Moved verbatim → references/advanced-patterns.md § "Step 9".
Load when: provisioning serverless, Global Datastore, or Outposts topologies.
Step 10 — CloudWatch alarms (operational hygiene)
Recommended CloudWatch alarms on every production cluster:
Moved verbatim → references/provisioning-cli-commands.md § "Step 10".
Load when: creating CPU/swap/eviction/replication-lag alarms.
NEVER do these things
NEVER pick Memcached for a workload that may need persistence,
failover, encryption, or pub/sub. Memcached → Redis is a full
migration: application client rewrite + cache-miss cold-start. Pick
Redis unless Memcached's specific properties are explicitly required.
NEVER enable AUTH without TLS. AUTH without TLS sends the
password in plaintext over the network. Always pair
--auth-token with --transit-encryption-enabled=true.
NEVER use a single-AZ subnet group for Multi-AZ Redis. Multi-AZ
requires the replica in a different AZ than the primary. Verify
aws ec2 describe-subnets shows >=2 distinct AZs in the subnet
group before create-replication-group.
NEVER open the cache security group to 0.0.0.0/0. Even with
AUTH, internet exposure invites scanning and exploit attempts.
Always scope inbound to the application's SG.
NEVER use noeviction maxmemory-policy for a cache. noeviction
returns OOM on writes when memory fills — use allkeys-lru (or
allkeys-lfu for skewed access). noeviction is for STORES, not
caches.
NEVER use allkeys-lru maxmemory-policy for a session store.
Silent eviction breaks sessions. Use noeviction and plan capacity
so memory never fills.
NEVER assume Memcached AZMode=cross-az provides failover. It
only distributes nodes across AZs — a failed node's data is LOST
(no persistence, no replication). Only Redis has true Multi-AZ.
NEVER add encryption in transit to an existing production Redis
cluster without a maintenance window. The rolling node replacement
disconnects every client for 30-90 seconds per node. Enable at
creation.
NEVER plan to "switch to cluster mode later." Migrating
cluster-mode-disabled → cluster-mode-enabled requires a full cluster
migration (new group + client repoint). For any workload whose write
rate may grow, default to cluster mode enabled up front.
NEVER size Redis nodes by spec-sheet memory. Redis needs ~50%
overhead for fork-on-BGSAVE, query buffers, copy-on-write. Plan
for 50% of nominal; for Memcached, plan for 90%.
NEVER set snapshot-retention-limit to 0 on a production Redis
cluster. Disabling snapshots means no point-in-time recovery.
Use 7-35 days for production, 1-3 for dev.
NEVER assume replicas add memory capacity. Redis replicas hold
a copy of the same data — they add READ capacity and availability,
NOT storage. To add memory, add shards (cluster mode enabled) or
larger nodes.
NEVER mix maintenance and snapshot windows. ElastiCache will
reject overlapping windows, or worse, silently skip one. Set them
at least 2 hours apart.
NEVER use end-of-life node families (cache.t1, cache.m1,
cache.m2, cache.r3 and older). Use Graviton (g-series:
cache.r6g, cache.m6g, cache.t4g) for best price/performance.
Output format
CACHE: <cluster-or-replication-group-name>
VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING
CHECKLIST:
[✓|✗] Engine: redis | valkey | memcached
[✓|✗] Cluster mode: ENABLED (<N> shards) | DISABLED (single primary)
[✓|✗] Node type: cache.<family>.<size> (<memory> GiB nominal; <usable> GiB usable)
[✓|✗] Replicas: <N> per shard | None (Memcached)
[✓|✗] Multi-AZ with automatic failover: Enabled (replica in different AZ) | Disabled (Memcached N/A)
[✓|✗] Subnet group: <name> (spans <N> AZs)
[✓|✗] Security group: <sg-id> (inbound port 6379 Redis / 11211 Memcached from <app-sg>)
[✓|✗] Encryption at rest: Enabled (customer CMK <key-arn> | AWS-managed) | Disabled (Memcached N/A)
[✓|✗] Encryption in transit (TLS): Enabled | Disabled (Memcached N/A)
[✓|✗] AUTH token: Enabled (16+ chars) | Disabled
[✓|✗] Parameter group: <name> (maxmemory-policy=<policy>, timeout=<s>)
[✓|✗] Snapshot retention: <N> days (window: <UTC-range>) | Disabled (Memcached N/A)
[✓|✗] Maintenance window: <UTC-range>
[✓|✗] Global Datastore: members in <regions> | Single-region
[✓|✗] ElastiCache Serverless: Yes | No
VERIFICATION_COMMANDS:
aws elasticache describe-replication-groups --replication-group-id <name>
aws elasticache describe-cache-clusters --cache-cluster-id <name> --show-cache-node-info
aws elasticache describe-cache-parameter-groups --cache-parameter-group-name <pg>
aws ec2 describe-subnets --subnet-ids <subnet-ids>
aws kms describe-key --key-id <cmk-id>
Worked example — production Redis cluster mode enabled
CACHE: prod-cache
VERDICT: READY_TO_DEPLOY
CHECKLIST:
[✓] Engine: redis
[✓] Cluster mode: ENABLED (3 shards)
[✓] Node type: cache.r6g.2xlarge (62.34 GiB nominal; 31.17 GiB usable per shard; 93.51 GiB total usable)
[✓] Replicas: 1 per shard (3 total) — read scaling + Multi-AZ failover
[✓] Multi-AZ with automatic failover: Enabled (replica in different AZ per shard)
[✓] Subnet group: prod-cache-subnet (spans 3 AZs: us-east-1a/b/c)
[✓] Security group: sg-cache123 (inbound port 6379 from sg-app456)
[✓] Encryption at rest: Enabled (customer CMK alias/prod-cache-kms)
[✓] Encryption in transit (TLS): Enabled
[✓] AUTH token: Enabled (24-char base64, stored in Secrets Manager)
[✓] Parameter group: prod-redis-pg (maxmemory-policy=allkeys-lru, timeout=300, tcp-keepalive=60)
[✓] Snapshot retention: 7 days (window: 03:00-05:00 UTC)
[✓] Maintenance window: sun:05:00-sun:07:00
[✓] Global Datastore: Single-region (us-east-1)
[✓] ElastiCache Serverless: No
VERIFICATION_COMMANDS:
aws elasticache describe-replication-groups --replication-group-id prod-cache
aws elasticache describe-cache-clusters --cache-cluster-id prod-cache-0001 --show-cache-node-info
aws elasticache describe-cache-parameter-groups --cache-parameter-group-name prod-redis-pg
aws ec2 describe-subnets --subnet-ids subnet-0aaa subnet-0bbb subnet-0ccc
aws kms describe-key --key-id alias/prod-cache-kms
Decision tree: Redis cluster mode enabled vs disabled
Is the workload write-heavy (> 50,000 writes/sec sustained)?
├── YES → Cluster mode ENABLED
│ (single primary cannot keep up; need horizontal write scaling)
└── NO → Is the write rate expected to grow beyond ~100k writes/sec?
├── YES → Cluster mode ENABLED (default for growing workloads)
└── NO → Is multi-key transactional consistency (MULTI/EXEC across keys)
required?
├── YES → Cluster mode DISABLED
│ (all keys on one primary; transactions trivial)
│ OR cluster mode ENABLED with hash-tag keys ({tag})
└── NO → Is the workload stable and modest (< 50k writes/sec)?
├── YES → Cluster mode DISABLED (simpler client config)
└── NO → Cluster mode ENABLED
Decision tree: Redis vs Memcached
Does the workload need ANY of:
persistence, replication, failover, encryption, pub/sub,
sorted sets, Lua, streams, Global Datastore?
├── YES → Redis OSS (or Valkey)
└── NO → Is genuinely simple, ephemeral, multi-threaded key-value cache
acceptable WITH no failover, no persistence, no encryption?
├── YES → Memcached
│ (multi-threading per node; LRU only; max 1 MB items)
└── NO → Redis OSS (default; the safest choice)
Error handling
Moved verbatim → references/error-handling.md § "Error handling".
Load when: an API error fires, a cluster is stuck MODIFYING, or a migration is needed.
Worked example — provisioned Redis cluster mode enabled with Multi-AZ
Moved verbatim → references/worked-examples.md § "Worked example".
Load when: emitting the full CLI sequence and checklist for the canonical production pattern.
Recent AWS features (2023-2026)
Moved verbatim → references/advanced-patterns.md § "Recent AWS features 2023-2026".
Load when: deciding on Valkey, Graviton nodes, Redis 7.x, or serverless.
References (load on demand)
- references/worked-examples.md — canonical production Redis cluster-mode-enabled CLI sequence + checklist
- references/error-handling.md — API error triage: name exists, subnet single-AZ, AUTH/TLS, snapshot restore, MODIFYING stuck, cluster-mode migration
- references/advanced-patterns.md — reasoning framework, dependency-graph deep dive, misconceptions, ACL detail, Serverless/Global Datastore/Outposts, recent AWS features
- references/engine-and-topology.md — engine math, shard estimator, failover semantics, feature matrix, sizing rules (extended with SKILL.md detail)
- references/provisioning-cli-commands.md — copy-pasteable CLI sequence (extended with subnet group, SG, snapshot, restore, alarms, parameters)
Domain
AWS CloudOps / ElastiCache Provisioning & Cache Topology Design.
AWS documentation
1---2name: elasticache-cache-deployer3description: 'Provisions ElastiCache (Redis OSS / Memcached) clusters with production defaults: engine selection (Redis for persistence, clustering, pub/sub, TLS vs Memcached for simple key-value, multi-threaded, no persistence), cluster mode enabled vs disabled, node type sizing, Multi-AZ failover (Redis only), VPC-only networking, encryption at-rest + in-transit + AUTH (Redis only), subnet group, parameter group maxmemory-policy, snapshot retention, ElastiCache Serverless, Global Datastore. Emits a READY_TO_DEPLOY checklist with verification commands. Use when creating an ElastiCache cluster, choosing between Redis and Memcached, designing a Multi-AZ Redis failover topology, sizing cache nodes, or generating provisioning CLI commands / IaC templates. Triggers: create ElastiCache, provision Redis, provision Memcached, ElastiCache cluster mode, Redis replication group, Global Datastore, ElastiCache Serverless, cache node type sizing.'4license: Apache-2.05compatibility: 'Agent runtime that reads SKILL.md (Claude Code, Cursor, Windsurf, Codex, Gemini). For live deployment: AWS CLI v2 with elasticache, ec2, kms, and iam access. Works with Terraform aws_elasticache_cluster / aws_elasticache_replication_group resources and CloudFormation AWS::ElastiCache::* templates.'6metadata:7 source: https://skillmd.com/skills/jhkchan/elasticache-cache-deployer8 domain: aws-cloudops9 complexity: high10 requires_llm: 'true'11 phase: '1'12 supports_pipeline: 'true'13 entry_point: 'false'14 family: Databases15 task_type: deploy16 skill_class: capability17 lifecycle_status: active18 verdict_shape: READY_TO_DEPLOY | PREREQUISITES_MISSING19 version: 0.1.020 author: Jacky Chan — AWS Community Builder21 tags: aws, elasticache, redis, memcached, cloudops, deploy, databases, cache, provisioning, replication-group, multi-az, encryption, global-datastore, serverless22 dependencies: aws-orchestrator23 keywords: aws, elasticache, redis, memcached, cloudops, deploy, provisioning, cache, replication group, cluster mode, multi-az, failover, encryption at rest, encryption in transit, auth token, tls, subnet group, parameter group, maxmemory-policy, allkeys-lru, noeviction, snapshot, backup, global datastore, elasticache serverless, outposts24 when_to_use: Invoke when the user wants to create a new ElastiCache cluster (Redis or Memcached), design a Multi-AZ Redis failover topology, choose between Redis and Memcached, size cache nodes for a workload, harden an existing cluster before production (TLS, AUTH, encryption at rest), set up a Global Datastore for cross-region replication, provision an ElastiCache Serverless cache, or generate provisioning CLI commands / IaC templates. Do NOT invoke for auditing existing cluster posture (use elasticache-cluster-auditor), or for non-ElastiCache caches (DynamoDB DAX, MemoryDB for Redis, self-managed Redis on EC2).25---2627# ElastiCache Cache Deployer2829An AWS CloudOps agent skill that provisions ElastiCache (Redis OSS /30Memcached) clusters with correct defaults. The skill walks the operator31through a 10-step provisioning procedure, captures the operator's32engine, topology, security, and capacity decisions, explains why each33default matters, and emits a READY_TO_DEPLOY checklist with34copy-pasteable verification commands.3536## Activation keywords3738create ElastiCache, provision Redis, provision Memcached, ElastiCache39deployment, replication group, cluster mode enabled, cluster mode40disabled, Multi-AZ Redis, automatic failover, encryption at rest,41encryption in transit, AUTH token, TLS, subnet group, parameter group,42maxmemory-policy, allkeys-lru, noeviction, snapshot retention,43Global Datastore, ElastiCache Serverless, Outposts, cache node type,44cache.t3, cache.r6g, cache.x2g.4546## Invocation contract (hard requirement)4748When this skill is invoked with a cache-provisioning request (cluster49name, engine choice, workload shape, region, or a partial configuration),50the agent MUST respond with the READY_TO_DEPLOY checklist defined in51§"Output format" using the literal all-caps labels `CACHE:`, `VERDICT:`,52`CHECKLIST:`, and `VERIFICATION_COMMANDS:`. Do NOT preface the checklist53with prose, headings, or disclaimers — emit the block as the first lines54of the response. This contract is what assertion-based evals and55downstream provisioning pipelines rely on; deviating from the literal56labels breaks automation silently.5758## Mindset5960**One-line takeaway:** ElastiCache correctness is decided at creation61time. Engine choice (Redis vs Memcached), cluster-mode topology, node62type, and the Multi-AZ + encryption bundle are impossible or disruptive63to change later — the provisioning procedure treats each as a one-way64door and forces an explicit decision before the `create` call.6566Three misconceptions dominate ElastiCache misdesign at provisioning time:6768> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Mindset misconceptions".69> Load when: you need the full argument behind the engine/cluster-mode/Multi-AZ misconceptions.7071## Quick navigation7273| Section | When to read |74|---|---|75| §"Prerequisites" | Always — verify before provisioning |76| §"Step 1 — Engine selection" | Picking Redis vs Memcached |77| §"Step 2 — Cluster mode decision" | Single-shard vs sharded Redis |78| §"Step 3 — Node type sizing" | Picking cache.t3 / r6g / x2g |79| §"Step 4 — Multi-AZ + failover" | Production Redis topology |80| §"Step 5 — Network + security" | VPC, subnet group, SG, ports |81| §"Step 6 — Encryption + AUTH + TLS" | Redis-only security bundle |82| §"Step 7 — Parameter groups" | maxmemory-policy, timeout |83| §"Step 8 — Snapshots / backups" | Redis-only automated backups |84| §"Step 9 — Serverless / Global Datastore" | Latest 2023-2026 features |85| §"Step 10 — CloudWatch alarms" | Operational hygiene |86| §"NEVER do these things" | Review before signing off |87| §"Output format" | The literal checklist template |88| references/engine-and-topology.md | Deep Redis-vs-Memcached + cluster-mode math |89| references/provisioning-cli-commands.md | Copy-pasteable CLI sequence |9091## Reasoning framework (why provisioning order matters)9293> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Reasoning framework".94> Load when: sequencing engine, cluster mode, encryption, subnet group, node type, and parameter decisions.9596## ElastiCache configuration dependency graph (novel heuristic)9798ElastiCache configurations are NOT independent. Many are immutable99after creation, others silently downgrade. Use this graph both to100sequence provisioning and to debug "why can't I add this?" later.101102| Configuration | Hard dependencies (API error without) | Silent failure / immutability | Enables downstream |103|---|---|---|---|104| Engine (Redis / Memcached) | none — `create` argument | **IMMUTABLE** — migration = full cluster swap + client rewrite | persistence, replication, clustering, encryption, pub/sub (Redis only) |105| Cluster mode (enabled / disabled) | Redis engine | **IMMUTABLE for write scaling** — switching disabled → enabled requires new group + cutover | horizontal write scaling, up to 500 shards |106| Node type | none — `create` argument | changeable via `modify` with rolling node replacement (disconnects clients) | memory budget, CPU, network |107| Multi-AZ with automatic failover | Redis engine + subnet group spanning >=2 AZs + >=1 replica | failover promoted only if replica is in a different AZ than primary | primary-AZ-failure resilience |108| Number of replicas | Redis engine | 0-5 per shard (cluster mode enabled); 0-5 total (cluster mode disabled) | read scaling + failover |109| Encryption at rest | Redis engine + must enable at creation | **CANNOT be added post-creation** without dump-and-restore; Memcached: NOT supported | compliance (PCI-DSS, HIPAA) |110| Encryption in transit (TLS) | Redis engine + must enable at creation + AUTH token recommended | can be enabled via `modify` with rolling replacement (client disconnects); Memcached: NOT supported | TLS-only clients, network sniffing defense |111| AUTH token | Redis engine + encryption in transit strongly recommended | AUTH requires TLS — without TLS the token traverses network in plaintext | password-protected Redis |112| Subnet group (CacheSubnetGroupName) | VPC + >=1 subnet; >=2 AZs for Multi-AZ | **subnets CANNOT be removed** once added; can only add | VPC-only addressing |113| Security group | VPC | port 6379 (Redis) or 11211 (Memcached) inbound from application SG | network isolation |114| Parameter group | none — `create` argument | changes apply on next reboot (parameter group modifications are not immediate) | maxmemory-policy, timeout, tcp-keepalive |115| Snapshot retention (automated) | Redis engine + `snapshotRetentionLimit > 0` | Memcached: NOT supported; restore creates a NEW cluster | point-in-time recovery for Redis |116| Snapshot window | Redis engine + snapshots enabled | maintenance / snapshot windows must NOT overlap | deterministic backup timing |117| Maintenance window | none | ElastiCache applies engine upgrades in this window | controlled upgrade timing |118| Global Datastore | Redis engine + cluster mode enabled + >=2 regions + each region's cluster already provisioned | primary cluster must be cluster-mode-enabled; each region uses its own KMS key / node type | cross-region low-latency reads, DR |119| ElastiCache Serverless | none — separate API (`create-serverless-cache`) | NOT compatible with cluster mode, Global Datastore, Outposts; VPC-only | no capacity management, automatic scaling |120| Outposts | Redis engine + Outpost in account | subset of node types only; data residency constraint | on-prem latency, data-sovereign workloads |121122> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Configuration dependency graph".123> Load when: the immutability analysis and cross-dependency gotchas behind the table.124125## Expert heuristic: effective memory calculator126127> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Expert heuristic: effective memory calculator".128> Load when: sizing real usable memory (Redis 50% rule vs Memcached 90%).129numbers.130131## Expert heuristic: cluster mode shard count estimator132133> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Expert heuristic: cluster mode shard count estimator".134> Load when: computing shard count from sustained write rate (60% rule) and scenario shapes.135136## Expert heuristic: failover promotion semantics137138> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Expert heuristic: failover promotion semantics".139> Load when: reasoning about promotion time, data-loss windows, and Memcached cross-az.140141## Prerequisites (verify before provisioning)142143Before emitting provisioning commands, verify these prerequisites. If144any are missing, the verdict is **PREREQUISITES_MISSING** with a145specific gap citation.146147| Prerequisite | Why it matters | How to verify |148|---|---|---|149| AWS account with ElastiCache access | Can't provision without it | `aws sts get-caller-identity` |150| Region selected | Cache nodes, subnet groups, snapshots are region-scoped | `aws configure get region` |151| VPC ID + at least 2 subnets in different AZs (for Multi-AZ Redis) | ElastiCache is VPC-only; Multi-AZ requires multi-AZ subnet group | `aws ec2 describe-subnets --filters "Name=vpc-id,Values=<vpc>"` — confirm >=2 distinct `AvailabilityZone` values |152| Cluster name unique in this region | Names are region-unique | `aws elasticache describe-replication-groups --replication-group-id <name>` returns `ReplicationGroupNotFound` |153| KMS key ARN (if encryption at rest with customer CMK) | Custom encryption requires a CMK in the same region | `aws kms describe-key --key-id <cmk-id>` |154| Security group with correct port (6379 Redis / 11211 Memcached) inbound from application SG | Network isolation; wrong port = silent connectivity failure | `aws ec2 describe-security-groups --group-ids <sg>` — verify inbound rule on 6379 or 11211 |155| AUTH token strength (if Redis AUTH) | Must be 16-128 chars, printable, non-whitespace | Generate via `openssl rand -base64 24` |156| Workload description (cache vs store, write rate, data size) | Drives engine, cluster mode, node type, replica count, maxmemory-policy decisions | Captured in the prompt or follow-up question |157158If any prerequisite is missing, output `VERDICT: PREREQUISITES_MISSING`159and cite the specific gap.160161## 10-step provisioning procedure162163### Step 1 — Engine selection (immutable — decide BEFORE create)164165The engine decision is the highest-impact ElastiCache design choice166and is **immutable** without a full migration.167168**Decision tree:**169170> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 1".171> Load when: walking the Redis-vs-Memcached engine decision. The condensed tree lives in § Decision tree: Redis vs Memcached.172173> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 1".174> Load when: comparing engines feature-by-feature or reviewing the Memcached migration mistake.175176### Step 2 — Cluster mode decision (immutable for write scaling — decide BEFORE create)177178For Redis, cluster mode determines whether writes scale horizontally.179This is the second-highest-impact decision and is **effectively180immutable** without a full cluster migration.181182**Decision tree:**183184> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 2".185> Load when: walking the cluster-mode decision incl. MULTI/EXEC. The condensed tree lives in § Decision tree: Redis cluster mode enabled vs disabled.186187> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 2".188> Load when: hash slots, CROSSSLOT limits, or the disabled→enabled migration mistake.189190### Step 3 — Node type sizing191192ElastiCache offers cache.node-type families. Choose based on workload193shape.194195**Node family selection:**196197| Family | Optimized for | Use when |198|---|---|---|199| `cache.r7g`, `cache.r6g` | Memory | General-purpose Redis; large datasets; production |200| `cache.x2g` | Memory (max) | Very large datasets; dense packing |201| `cache.m7g`, `cache.m6g` | Balanced (memory + compute) | Mixed workloads; mid-size datasets |202| `cache.c7g`, `cache.c6g` | Compute | Computed-heavy (Lua scripts, SORT) |203| `cache.t4g`, `cache.t3` | Burst | Dev / test / low-traffic; non-production |204| `cache.t1`, `cache.m1`, `cache.m2` | Legacy | DO NOT USE — end-of-life |205206> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 3".207> Load when: picking node families/sizes and applying the 50%/90% memory rules.208209### Step 4 — Multi-AZ + automatic failover (Redis only)210211Multi-AZ with automatic failover is the primary resilience control for212Redis. Memcached does NOT support Multi-AZ.213214> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 4".215> Load when: checking the five gating requirements for Multi-AZ failover.216217> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 4".218> Load when: promotion flow, endpoint behavior, or AZ topology examples.219220### Step 5 — Network + security (VPC, subnet group, security group)221222ElastiCache is **VPC-only** — there is no public IP option (unlike223RDS). All clusters live inside a VPC.224225**Subnet group creation:**226227> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 5".228> Load when: creating the multi-AZ cache subnet group.229230Verify the subnets span >=2 AZs:231232> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 5".233> Load when: verifying the subnet group spans >=2 AZs before create.234235**Security group rules:**236237> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 5".238> Load when: opening port 6379/11211 inbound from the application SG.239240**NEVER** open the cache port to `0.0.0.0/0` — even with AUTH, this241exposes the cluster to internet scanning. Always scope inbound to the242application's SG.243244> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 5".245> Load when: the cluster is unreachable or the SG was not attached at creation.246247### Step 6 — Encryption + AUTH + TLS (Redis only)248249Encryption and AUTH are Redis-only. Memcached has NO encryption250support — if compliance requires encryption, the answer is Redis.251252**Encryption at rest:**253> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 6".254> Load when: using a customer CMK or adding encryption to an existing cluster.255256**Encryption in transit (TLS):**257> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 6".258> Load when: enabling TLS post-creation or reasoning about rolling replacement.259260**AUTH token:**261> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 6".262> Load when: generating and applying the Redis AUTH token.263264> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 6".265> Load when: using ACL user groups or pairing AUTH with TLS.266267### Step 7 — Parameter groups (maxmemory-policy, timeout)268269Parameter groups control Redis / Memcached runtime behavior. Changes270apply on next reboot (not immediate).271272**Redis maxmemory-policy decision (load-bearing):**273274| Policy | Behavior when memory fills | Use when |275|---|---|---|276| `allkeys-lru` | Evict least-recently-used key | General cache (data is disposable; LRU is optimal) |277| `allkeys-lfu` | Evict least-frequently-used key | Cache with skewed access (long-tail popular keys) |278| `volatile-lru` | Evict LRU among keys with TTL only | Mixed store + cache (TTL'd items evicted, persistent kept) |279| `volatile-ttl` | Evict closest-to-expiry TTL'd key | Priority-based cache (soon-to-expire items go first) |280| `noeviction` | Return OOM error on writes | Session store, persistent store (NEVER silently evict) |281| `allkeys-random` | Evict random key | Uniform-access cache (rarely optimal) |282| `volatile-random` | Evict random TTL'd key | Rare; use volatile-lru instead |283284**Decision rule:**285> **Moved verbatim** → [references/engine-and-topology.md](references/engine-and-topology.md) § "Step 7".286> Load when: mapping cache vs store vs mix workloads to a policy.287 with TTL on disposable keys.288289> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 7".290> Load when: setting non-maxmemory parameters for Redis or Memcached.291292### Step 8 — Snapshots / backups (Redis only)293294Redis supports automated snapshots (RDB files) for point-in-time295recovery. Memcached does NOT support snapshots.296297**Enable automated snapshots at creation:**298299> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 8".300> Load when: enabling snapshot retention/window at creation.301302> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 8".303> Load when: choosing retention days and windows.304305**Manual snapshot:**306307> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 8".308> Load when: taking an on-demand snapshot.309310**Restore from snapshot creates a NEW cluster:**311312> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 8".313> Load when: restoring a replication group from a snapshot ARN.314315**Common mistake:** setting retention limit to 0 (snapshots disabled).316For production Redis, set retention 7-35 days. For dev, 1-3 days is fine.317318### Step 9 — ElastiCache Serverless / Global Datastore (latest features)319320> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Step 9".321> Load when: provisioning serverless, Global Datastore, or Outposts topologies.322323### Step 10 — CloudWatch alarms (operational hygiene)324325Recommended CloudWatch alarms on every production cluster:326327> **Moved verbatim** → [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) § "Step 10".328> Load when: creating CPU/swap/eviction/replication-lag alarms.329330## NEVER do these things3313321. **NEVER pick Memcached for a workload that may need persistence,333 failover, encryption, or pub/sub.** Memcached → Redis is a full334 migration: application client rewrite + cache-miss cold-start. Pick335 Redis unless Memcached's specific properties are explicitly required.3363372. **NEVER enable AUTH without TLS.** AUTH without TLS sends the338 password in plaintext over the network. Always pair339 `--auth-token` with `--transit-encryption-enabled=true`.3403413. **NEVER use a single-AZ subnet group for Multi-AZ Redis.** Multi-AZ342 requires the replica in a different AZ than the primary. Verify343 `aws ec2 describe-subnets` shows >=2 distinct AZs in the subnet344 group before `create-replication-group`.3453464. **NEVER open the cache security group to `0.0.0.0/0`.** Even with347 AUTH, internet exposure invites scanning and exploit attempts.348 Always scope inbound to the application's SG.3493505. **NEVER use `noeviction` maxmemory-policy for a cache.** `noeviction`351 returns OOM on writes when memory fills — use `allkeys-lru` (or352 `allkeys-lfu` for skewed access). `noeviction` is for STORES, not353 caches.3543556. **NEVER use `allkeys-lru` maxmemory-policy for a session store.**356 Silent eviction breaks sessions. Use `noeviction` and plan capacity357 so memory never fills.3583597. **NEVER assume Memcached `AZMode=cross-az` provides failover.** It360 only distributes nodes across AZs — a failed node's data is LOST361 (no persistence, no replication). Only Redis has true Multi-AZ.3623638. **NEVER add encryption in transit to an existing production Redis364 cluster without a maintenance window.** The rolling node replacement365 disconnects every client for 30-90 seconds per node. Enable at366 creation.3673689. **NEVER plan to "switch to cluster mode later."** Migrating369 cluster-mode-disabled → cluster-mode-enabled requires a full cluster370 migration (new group + client repoint). For any workload whose write371 rate may grow, default to cluster mode enabled up front.37237310. **NEVER size Redis nodes by spec-sheet memory.** Redis needs ~50%374 overhead for fork-on-BGSAVE, query buffers, copy-on-write. Plan375 for 50% of nominal; for Memcached, plan for 90%.37637711. **NEVER set `snapshot-retention-limit` to 0 on a production Redis378 cluster.** Disabling snapshots means no point-in-time recovery.379 Use 7-35 days for production, 1-3 for dev.38038112. **NEVER assume replicas add memory capacity.** Redis replicas hold382 a copy of the same data — they add READ capacity and availability,383 NOT storage. To add memory, add shards (cluster mode enabled) or384 larger nodes.38538613. **NEVER mix maintenance and snapshot windows.** ElastiCache will387 reject overlapping windows, or worse, silently skip one. Set them388 at least 2 hours apart.38939014. **NEVER use end-of-life node families** (`cache.t1`, `cache.m1`,391 `cache.m2`, `cache.r3` and older). Use Graviton (g-series:392 `cache.r6g`, `cache.m6g`, `cache.t4g`) for best price/performance.393394## Output format395396```text397CACHE: <cluster-or-replication-group-name>398VERDICT: READY_TO_DEPLOY | PREREQUISITES_MISSING399CHECKLIST:400 [✓|✗] Engine: redis | valkey | memcached401 [✓|✗] Cluster mode: ENABLED (<N> shards) | DISABLED (single primary)402 [✓|✗] Node type: cache.<family>.<size> (<memory> GiB nominal; <usable> GiB usable)403 [✓|✗] Replicas: <N> per shard | None (Memcached)404 [✓|✗] Multi-AZ with automatic failover: Enabled (replica in different AZ) | Disabled (Memcached N/A)405 [✓|✗] Subnet group: <name> (spans <N> AZs)406 [✓|✗] Security group: <sg-id> (inbound port 6379 Redis / 11211 Memcached from <app-sg>)407 [✓|✗] Encryption at rest: Enabled (customer CMK <key-arn> | AWS-managed) | Disabled (Memcached N/A)408 [✓|✗] Encryption in transit (TLS): Enabled | Disabled (Memcached N/A)409 [✓|✗] AUTH token: Enabled (16+ chars) | Disabled410 [✓|✗] Parameter group: <name> (maxmemory-policy=<policy>, timeout=<s>)411 [✓|✗] Snapshot retention: <N> days (window: <UTC-range>) | Disabled (Memcached N/A)412 [✓|✗] Maintenance window: <UTC-range>413 [✓|✗] Global Datastore: members in <regions> | Single-region414 [✓|✗] ElastiCache Serverless: Yes | No415VERIFICATION_COMMANDS:416 aws elasticache describe-replication-groups --replication-group-id <name>417 aws elasticache describe-cache-clusters --cache-cluster-id <name> --show-cache-node-info418 aws elasticache describe-cache-parameter-groups --cache-parameter-group-name <pg>419 aws ec2 describe-subnets --subnet-ids <subnet-ids>420 aws kms describe-key --key-id <cmk-id>421```422423### Worked example — production Redis cluster mode enabled424425```text426CACHE: prod-cache427VERDICT: READY_TO_DEPLOY428CHECKLIST:429 [✓] Engine: redis430 [✓] Cluster mode: ENABLED (3 shards)431 [✓] Node type: cache.r6g.2xlarge (62.34 GiB nominal; 31.17 GiB usable per shard; 93.51 GiB total usable)432 [✓] Replicas: 1 per shard (3 total) — read scaling + Multi-AZ failover433 [✓] Multi-AZ with automatic failover: Enabled (replica in different AZ per shard)434 [✓] Subnet group: prod-cache-subnet (spans 3 AZs: us-east-1a/b/c)435 [✓] Security group: sg-cache123 (inbound port 6379 from sg-app456)436 [✓] Encryption at rest: Enabled (customer CMK alias/prod-cache-kms)437 [✓] Encryption in transit (TLS): Enabled438 [✓] AUTH token: Enabled (24-char base64, stored in Secrets Manager)439 [✓] Parameter group: prod-redis-pg (maxmemory-policy=allkeys-lru, timeout=300, tcp-keepalive=60)440 [✓] Snapshot retention: 7 days (window: 03:00-05:00 UTC)441 [✓] Maintenance window: sun:05:00-sun:07:00442 [✓] Global Datastore: Single-region (us-east-1)443 [✓] ElastiCache Serverless: No444VERIFICATION_COMMANDS:445 aws elasticache describe-replication-groups --replication-group-id prod-cache446 aws elasticache describe-cache-clusters --cache-cluster-id prod-cache-0001 --show-cache-node-info447 aws elasticache describe-cache-parameter-groups --cache-parameter-group-name prod-redis-pg448 aws ec2 describe-subnets --subnet-ids subnet-0aaa subnet-0bbb subnet-0ccc449 aws kms describe-key --key-id alias/prod-cache-kms450```451452## Decision tree: Redis cluster mode enabled vs disabled453454```text455Is the workload write-heavy (> 50,000 writes/sec sustained)?456├── YES → Cluster mode ENABLED457│ (single primary cannot keep up; need horizontal write scaling)458└── NO → Is the write rate expected to grow beyond ~100k writes/sec?459 ├── YES → Cluster mode ENABLED (default for growing workloads)460 └── NO → Is multi-key transactional consistency (MULTI/EXEC across keys)461 required?462 ├── YES → Cluster mode DISABLED463 │ (all keys on one primary; transactions trivial)464 │ OR cluster mode ENABLED with hash-tag keys ({tag})465 └── NO → Is the workload stable and modest (< 50k writes/sec)?466 ├── YES → Cluster mode DISABLED (simpler client config)467 └── NO → Cluster mode ENABLED468```469470## Decision tree: Redis vs Memcached471472```text473Does the workload need ANY of:474 persistence, replication, failover, encryption, pub/sub,475 sorted sets, Lua, streams, Global Datastore?476├── YES → Redis OSS (or Valkey)477└── NO → Is genuinely simple, ephemeral, multi-threaded key-value cache478 acceptable WITH no failover, no persistence, no encryption?479 ├── YES → Memcached480 │ (multi-threading per node; LRU only; max 1 MB items)481 └── NO → Redis OSS (default; the safest choice)482```483484## Error handling485486> **Moved verbatim** → [references/error-handling.md](references/error-handling.md) § "Error handling".487> Load when: an API error fires, a cluster is stuck MODIFYING, or a migration is needed.488489## Worked example — provisioned Redis cluster mode enabled with Multi-AZ490491> **Moved verbatim** → [references/worked-examples.md](references/worked-examples.md) § "Worked example".492> Load when: emitting the full CLI sequence and checklist for the canonical production pattern.493494## Recent AWS features (2023-2026)495496> **Moved verbatim** → [references/advanced-patterns.md](references/advanced-patterns.md) § "Recent AWS features 2023-2026".497> Load when: deciding on Valkey, Graviton nodes, Redis 7.x, or serverless.498499## References (load on demand)500501- [references/worked-examples.md](references/worked-examples.md) — canonical production Redis cluster-mode-enabled CLI sequence + checklist502- [references/error-handling.md](references/error-handling.md) — API error triage: name exists, subnet single-AZ, AUTH/TLS, snapshot restore, MODIFYING stuck, cluster-mode migration503- [references/advanced-patterns.md](references/advanced-patterns.md) — reasoning framework, dependency-graph deep dive, misconceptions, ACL detail, Serverless/Global Datastore/Outposts, recent AWS features504- [references/engine-and-topology.md](references/engine-and-topology.md) — engine math, shard estimator, failover semantics, feature matrix, sizing rules (extended with SKILL.md detail)505- [references/provisioning-cli-commands.md](references/provisioning-cli-commands.md) — copy-pasteable CLI sequence (extended with subnet group, SG, snapshot, restore, alarms, parameters)506507## Domain508509AWS CloudOps / ElastiCache Provisioning & Cache Topology Design.510511## AWS documentation512513- **Amazon ElastiCache User Guide** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Welcome.html514- **Redis replication groups** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Replication.html515- **Memcached clusters** — https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html516- **ElastiCache cluster mode** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/ClusterMode.html517- **Encryption and AUTH** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/encryption.html518- **ElastiCache Serverless** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/serverless.html519- **Global Datastore** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/Redis-Global-Datastore.html520- **Choosing a node type** — https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/nodes-select-size.html