ElastiCache
Parity grade: A · SDK aws-sdk-go-v2/service/elasticache@v1.63.2 · last audited 2026-10-12 (221e362fa)
Category: Database · View PARITY.md on GitHub · All Services
ElastiCache clusters, replication groups, serverless caches and users. By default each cluster starts an embedded Redis-compatible server (miniredis). Engine details: ElastiCache architecture.
Quick start
export AWS_ENDPOINT_URL=http://localhost:8000
aws elasticache create-cache-cluster --cache-cluster-id my-redis \
--engine redis --cache-node-type cache.t3.micro --num-cache-nodes 1
ENDPOINT=$(aws elasticache describe-cache-clusters --cache-cluster-id my-redis \
--show-cache-node-info --query 'CacheClusters[0].CacheNodes[0].Endpoint' --output json)
redis-cli -h $(echo $ENDPOINT | jq -r .Address) -p $(echo $ENDPOINT | jq -r .Port)
aws elasticache create-replication-group --replication-group-id my-rg \
--replication-group-description "Test" --num-cache-clusters 2Supported operations
| Area | Operations |
|---|---|
| Cache clusters | CreateCacheCluster, DescribeCacheClusters, ModifyCacheCluster, RebootCacheCluster, DeleteCacheCluster |
| Replication groups | CreateReplicationGroup, DescribeReplicationGroups, ModifyReplicationGroup, DeleteReplicationGroup, TestFailover, IncreaseReplicaCount, DecreaseReplicaCount, ModifyReplicationGroupShardConfiguration |
| Global replication groups | create, describe, modify, delete, disassociate, failover, increase and decrease node groups, rebalance slots |
| Serverless | CreateServerlessCache, DescribeServerlessCaches, ModifyServerlessCache, DeleteServerlessCache, serverless cache snapshots (create, copy, export, delete, describe) |
| Snapshots | CreateSnapshot, CopySnapshot, DescribeSnapshots, DeleteSnapshot |
| Parameter groups | create, describe, modify, reset, delete, DescribeCacheParameters, DescribeEngineDefaultParameters |
| Subnet and security groups | cache subnet groups, cache security groups with ingress authorize and revoke |
| Users | CreateUser, DescribeUsers, ModifyUser, DeleteUser, and user groups |
| Reserved nodes | DescribeReservedCacheNodes, DescribeReservedCacheNodesOfferings, PurchaseReservedCacheNodesOffering |
| Updates and migration | DescribeServiceUpdates, DescribeUpdateActions, BatchApplyUpdateAction, BatchStopUpdateAction, StartMigration, TestMigration, CompleteMigration |
| Other | DescribeCacheEngineVersions, DescribeEvents, ListAllowedNodeTypeModifications, AddTagsToResource, RemoveTagsFromResource, ListTagsForResource |
Configuration
| Flag | Env | Default | Purpose |
|---|---|---|---|
--elasticache-engine | ELASTICACHE_ENGINE | embedded | embedded (miniredis), stub (metadata only) or docker |
--port-range-start | PORT_RANGE_START | 10000 | Start of the port range for cluster endpoints |
--port-range-end | PORT_RANGE_END | 10100 | End of the range (exclusive) |
In embedded mode the endpoint address and port are in the DescribeCacheClusters response.
Differences from AWS
NOTE
SnapshotArns and CopySnapshot TargetBucket are validated but nothing is imported or exported: there is no S3 wiring and miniredis has no RDB reader or writer. Restoring by SnapshotName uses a private gzip/gob keyspace format.
- Embedded mode takes listener ports from the allocator, so a caller-chosen
Portis not honoured. Other modes honour it. ModifyCacheClusterScaleConfighas no effect: Memcached node provisioning completes instantly.
Parity & Coverage
| Metric | Value |
|---|---|
| PARITY entries audited | 75 (73 ok, 2 partial) |
| Feature families | 12 (12 ok) |
| Known gaps | none |
| Structural gaps (can't be emulated) | 4 |
| Deferred items | 1 |
| Resource leaks | clean |
Structural Gaps
These do not block an A grade — no implementation could produce real data here because the underlying data source cannot exist in an emulator.
- CreateCacheCluster/CreateReplicationGroup SnapshotArns and CopySnapshot TargetBucket: S3 RDB import/export has no S3 wiring and miniredis has no RDB reader/writer; the ARNs are validated, nothing is imported or exported. SnapshotName restore is implemented with a private gzip/gob keyspace format (strings, hashes, lists, sets, sorted sets, streams, key and hash-field TTLs; HyperLogLog and stream consumer groups are not captured). Serverless snapshots stay metadata-only.
- CreateCacheCluster Port in embedded mode: listener ports come from the port allocator, a caller-chosen port cannot be guaranteed free on the host (honoured in pass-through modes).
- ModifyCacheCluster ScaleConfig: only paces gradual Memcached node provisioning, which completes instantly here; it has no output member.
- CreateCacheCluster AuthToken (reserved parameter, no documented effect) and ModifyReplicationGroup NodeGroupId (documented as unused).
Deferred Items
- Quota-exceeded faults: PARTIALLY addressed 2026-08-10 (gopherstack-nojq) -- CacheSubnetGroupQuotaExceeded (300/Region), CacheSubnetQuotaExceededFault (20/subnet-group), and ServerlessCacheQuotaForCustomerExceededFault (40/Region) are now enforced, using AWS's own documented default quotas (docs.aws.amazon.com/AmazonElastiCache/latest/dg/quota-limits.html, fetched and quoted verbatim in this pass) and the exact Fault each operation's real error deserializer recognizes (aws-sdk-go-v2/service/elasticache@v1.51.11/deserializers.go). The same quota-limits.html table also publishes 'Nodes per Region' (300, Fault NodeQuotaForCustomerExceeded), 'Nodes per cluster' (60 Memcached / 90 cluster-mode, Fault NodeQuotaForClusterExceeded), 'Parameter groups per Region' (300, CacheParameterGroupQuotaExceeded), 'Users per Region' (2000, UserQuotaExceeded), 'User groups per Region' (200, UserGroupQuotaExceeded), 'Users per user group' (100), 'User groups per replication group' (1), and 'Serverless snapshots per day per cache' (24, ServerlessCacheSnapshotQuotaExceededFault) -- all real, deterministic, and CreateCacheCluster's own error deserializer confirms it recognizes NodeQuotaForCustomerExceeded/NodeQuotaForClusterExceeded specifically (not just ClusterQuotaForCustomerExceeded, which quota-limits.html does NOT publish a default for and is correctly left unimplemented, per parity-principles.md's no-fabrication rule). None of these were implemented this pass: the issue asked to rank and implement what could be done faithfully rather than attempt every quota shallowly, and the three chosen (both subnet-group ops, and serverless cache creation) were judged the cleanest, most directly client-reachable, single-resource-invariant wins. 'Nodes per Region' in particular is a cross-resource aggregate (must sum node counts across every cache cluster AND every replication group's node groups in the region, not just Table.Len() on one map) -- a materially bigger and more error-prone change than the three implemented, and was deliberately left for a focused follow-up rather than risked here. The single-resource ones (Parameter/User/UserGroup quotas, Nodes-per-cluster) follow the identical implementable pattern already proven by this pass (Table.Len()/field-len >= const -> sentinel error -> xmlError with the exact wire code) and are good next-pass candidates, not open questions.
Audited Operations
75 audited operations
| Operation | Wire | Errors | State | Persist |
|---|---|---|---|---|
CreateCacheCluster | ok | ok | ok | ok |
DeleteCacheCluster | ok | ok | ok | ok |
DescribeCacheClusters | ok | ok | ok | ok |
ModifyCacheCluster | ok | ok | ok | ok |
RebootCacheCluster | ok | ok | ok | ok |
CreateReplicationGroup | ok | ok | ok | ok |
DeleteReplicationGroup | ok | ok | ok | ok |
DescribeReplicationGroups | ok | ok | ok | ok |
ModifyReplicationGroup | ok | ok | ok | ok |
TestFailover | ok | ok | ok | ok |
IncreaseReplicaCount | ok | ok | ok | ok |
DecreaseReplicaCount | ok | ok | ok | ok |
ModifyReplicationGroupShardConfiguration | ok | ok | ok | ok |
CreateCacheParameterGroup | ok | ok | ok | ok |
DeleteCacheParameterGroup | ok | ok | ok | ok |
DescribeCacheParameterGroups | ok | ok | ok | ok |
ModifyCacheParameterGroup | ok | ok | ok | ok |
ResetCacheParameterGroup | ok | ok | ok | ok |
DescribeCacheParameters | partial | ok | ok | ok |
DescribeEngineDefaultParameters | ok | ok | n/a | n/a |
CreateCacheSubnetGroup | ok | ok | ok | ok |
DeleteCacheSubnetGroup | ok | ok | ok | ok |
DescribeCacheSubnetGroups | ok | ok | ok | ok |
ModifyCacheSubnetGroup | ok | ok | ok | ok |
CreateCacheSecurityGroup | ok | ok | ok | ok |
AuthorizeCacheSecurityGroupIngress | ok | ok | ok | ok |
RevokeCacheSecurityGroupIngress | ok | ok | ok | ok |
DeleteCacheSecurityGroup | ok | ok | ok | ok |
DescribeCacheSecurityGroups | ok | ok | ok | ok |
CreateSnapshot | ok | ok | ok | ok |
DeleteSnapshot | ok | ok | ok | ok |
DescribeSnapshots | ok | ok | ok | ok |
CopySnapshot | ok | ok | ok | ok |
DescribeEvents | ok | ok | ok | n/a |
CreateServerlessCache | ok | ok | ok | ok |
ModifyServerlessCache | ok | ok | ok | ok |
DeleteServerlessCache | ok | ok | ok | ok |
DescribeServerlessCaches | ok | ok | ok | ok |
CreateServerlessCacheSnapshot | ok | ok | ok | ok |
CopyServerlessCacheSnapshot | ok | ok | ok | ok |
DeleteServerlessCacheSnapshot | ok | ok | ok | ok |
DescribeServerlessCacheSnapshots | ok | ok | ok | ok |
ExportServerlessCacheSnapshot | ok | ok | ok | ok |
CreateUser | ok | ok | ok | ok |
ModifyUser | ok | ok | ok | ok |
DeleteUser | ok | ok | ok | ok |
DescribeUsers | ok | ok | ok | ok |
CreateUserGroup | ok | ok | ok | ok |
ModifyUserGroup | ok | ok | ok | ok |
DeleteUserGroup | ok | ok | ok | ok |
DescribeUserGroups | ok | ok | ok | ok |
CreateGlobalReplicationGroup | ok | ok | ok | ok |
DeleteGlobalReplicationGroup | ok | ok | ok | ok |
DescribeGlobalReplicationGroups | ok | ok | ok | ok |
ModifyGlobalReplicationGroup | ok | ok | ok | ok |
DisassociateGlobalReplicationGroup | ok | ok | ok | ok |
FailoverGlobalReplicationGroup | ok | ok | ok | ok |
IncreaseNodeGroupsInGlobalReplicationGroup | ok | ok | ok | ok |
DecreaseNodeGroupsInGlobalReplicationGroup | ok | ok | ok | ok |
RebalanceSlotsInGlobalReplicationGroup | ok | ok | ok | ok |
DescribeReservedCacheNodes | ok | ok | ok | ok |
DescribeReservedCacheNodesOfferings | ok | ok | n/a | n/a |
PurchaseReservedCacheNodesOffering | partial | ok | ok | ok |
DescribeCacheEngineVersions | ok | ok | n/a | n/a |
DescribeServiceUpdates | ok | ok | n/a | n/a |
DescribeUpdateActions | ok | ok | n/a | n/a |
BatchApplyUpdateAction | ok | ok | ok | ok |
BatchStopUpdateAction | ok | ok | ok | ok |
ListAllowedNodeTypeModifications | ok | ok | n/a | n/a |
StartMigration | ok | ok | ok | ok |
TestMigration | ok | ok | ok | ok |
CompleteMigration | ok | ok | ok | ok |
ListTagsForResource | ok | ok | ok | ok |
AddTagsToResource | ok | ok | ok | ok |
RemoveTagsFromResource | ok | ok | ok | ok |
Audited Feature Families
| Feature Family | Status |
|---|---|
cache_clusters | ok |
replication_groups | ok |
cache_parameter_groups | ok |
cache_subnet_groups | ok |
cache_security_groups | ok |
snapshots | ok |
serverless_caches | ok |
users_and_user_groups | ok |
reserved_nodes | ok |
service_updates_and_events | ok |
tags | ok |
timestamps | ok |
