Skip to content
v2.273.0

Experimental

@aws-cdk/aws-elasticache-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.

ServerlessCacheProps Struct ​

Properties for defining a ServerlessCache.

Example ​

ts
declare const vpc: ec2.Vpc;

const serverlessCache = new elasticache.ServerlessCache(this, 'ServerlessCache', {
  engine: elasticache.CacheEngine.VALKEY_LATEST,
  backup: {
    // set a backup name before deleting a cache
    backupNameBeforeDeletion: "my-final-backup-name",
  },
  vpc,
});

Properties ​

backupBackupSettingsbackupBackupSettingsbackupBackupSettingsBackupBackupSettingsBackupBackupSettings= No backups configured#
Backup configuration.
cacheUsageLimitsCacheUsageLimitsPropertycache_usage_limitsCacheUsageLimitsPropertycacheUsageLimitsCacheUsageLimitsPropertyCacheUsageLimitsCacheUsageLimitsPropertyCacheUsageLimitsCacheUsageLimitsProperty= No usage limits#
Usage limits for the cache.
descriptionstringdescriptionstrdescriptionStringDescriptionstringDescription*string= No description#
A description for the cache.
engineCacheEngineengineCacheEngineengineCacheEngineEngineCacheEngineEngineCacheEngine= when not provided, the default e…#
The cache engine combined with the version Enum options: VALKEY_DEFAULT, VALKEY_7, VALKEY_8, REDIS_DEFAULT, MEMCACHED_DEFAULT The default options bring the latest versions available.
default

Default: when not provided, the default engine would be Valkey, latest version available (VALKEY_DEFAULT)

kmsKeyIKeykms_keyIKeykmsKeyIKeyKmsKeyIKeyKmsKeyIKey= Service managed encryption (AWS …#
KMS key for encryption.
default

Default: Service managed encryption (AWS owned KMS key)

securityGroupsISecurityGroup[]security_groupstyping.List[ISecurityGroup]securityGroupsList<ISecurityGroup>SecurityGroupsISecurityGroup[]SecurityGroups*[]ISecurityGroup= A new security group is created#
Security groups for the cache.
serverlessCacheNamestringserverless_cache_namestrserverlessCacheNameStringServerlessCacheNamestringServerlessCacheName*string= automatically generated name by …#
Name for the serverless cache.
default

Default: automatically generated name by Resource

userGroupIUserGroupuser_groupIUserGroupuserGroupIUserGroupUserGroupIUserGroupUserGroupIUserGroup= No user group#
User group for access control.
vpcIVpcvpcIVpcvpcIVpcVpcIVpcVpcIVpcrequired#
The VPC to place the cache in.
vpcSubnetsSubnetSelectionvpc_subnetsSubnetSelectionvpcSubnetsSubnetSelectionVpcSubnetsSubnetSelectionVpcSubnetsSubnetSelection= Private subnets with egress#
Which subnets to place the cache in.

Used as props by ​