Skip to content

ElastiCache

CloudMock emulates Amazon ElastiCache, supporting cache clusters, replication groups, subnet groups, parameter groups, tagging, and failover testing.

OperationStatusNotes
CreateCacheClusterSupportedCreates a cache cluster
DescribeCacheClustersSupportedLists cache clusters
ModifyCacheClusterSupportedModifies a cache cluster
DeleteCacheClusterSupportedDeletes a cache cluster
CreateReplicationGroupSupportedCreates a replication group
DescribeReplicationGroupsSupportedLists replication groups
ModifyReplicationGroupSupportedModifies a replication group
DeleteReplicationGroupSupportedDeletes a replication group
CreateCacheSubnetGroupSupportedCreates a subnet group
DescribeCacheSubnetGroupsSupportedLists subnet groups
DeleteCacheSubnetGroupSupportedDeletes a subnet group
CreateCacheParameterGroupSupportedCreates a parameter group
DescribeCacheParameterGroupsSupportedLists parameter groups
DeleteCacheParameterGroupSupportedDeletes a parameter group
AddTagsToResourceSupportedAdds tags to a resource
RemoveTagsFromResourceSupportedRemoves tags from a resource
ListTagsForResourceSupportedLists tags for a resource
TestFailoverSupportedSimulates a failover test
import { ElastiCacheClient, CreateCacheClusterCommand } from '@aws-sdk/client-elasticache';
const client = new ElastiCacheClient({
endpoint: 'http://localhost:4566',
region: 'us-east-1',
credentials: { accessKeyId: 'test', secretAccessKey: 'test' },
});
await client.send(new CreateCacheClusterCommand({
CacheClusterId: 'my-cache',
Engine: 'redis',
CacheNodeType: 'cache.t3.micro',
NumCacheNodes: 1,
}));
import boto3
client = boto3.client('elasticache',
endpoint_url='http://localhost:4566',
region_name='us-east-1',
aws_access_key_id='test',
aws_secret_access_key='test')
client.create_cache_cluster(
CacheClusterId='my-cache',
Engine='redis',
CacheNodeType='cache.t3.micro',
NumCacheNodes=1)
cloudmock.yml
services:
elasticache:
enabled: true
  • No actual Redis or Memcached engine is provisioned
  • Cache endpoints are generated but not functional
  • Failover testing updates status but does not simulate real failover