Repository navigation
Description
Service
CloudFormation / ElastiCache
API Action / Feature
CloudFormation resource types AWS::ElastiCache::CacheCluster, AWS::ElastiCache::SubnetGroup, AWS::ElastiCache::User, AWS::ElastiCache::UserGroup and AWS::ElastiCache::ServerlessCache.
Checked on Floci 2.1.0 (floci/floci:2.1.0) and on main at 071a170: no provisioner is registered for these types. With FLOCI_SERVICES_CLOUDFORMATION_ALLOW_STUB_UNSUPPORTED_RESOURCE_TYPES=false, the stack rolls back with Resource type <type> is not supported by Floci. With the default (true), the stack reports CREATE_COMPLETE, but nothing is created, and Ref and Fn::GetAtt return stub values.
Service API status on main:
CreateCacheCluster,CreateCacheSubnetGroupandCreateUserexist, so only the provisioners are missing.CreateUserGroupis tracked in [FEAT] ElastiCache user groups (RBAC) and replication group association #4455 (PR feat(elasticache): add user groups and associate them with replication groups #4435). TheUserGroupprovisioner depends on it.CreateServerlessCacheand the other serverless cache operations do not exist yet, soServerlessCacheneeds the service API as well.
Minimal template:
Resources:
Vpc:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 10.0.0.0/16
Subnet:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref Vpc
CidrBlock: 10.0.0.0/24
SubnetGroup:
Type: AWS::ElastiCache::SubnetGroup
Properties:
Description: example
SubnetIds: [!Ref Subnet]
DefaultUser:
Type: AWS::ElastiCache::User
Properties:
UserId: example-default
UserName: default
Engine: redis
AccessString: off -@all
NoPasswordRequired: true
AppUser:
Type: AWS::ElastiCache::User
Properties:
UserId: example-app
UserName: example-app
Engine: redis
AccessString: on ~* +@all
AuthenticationMode:
Type: password
Passwords: [example-password-0123456789]
UserGroup:
Type: AWS::ElastiCache::UserGroup
Properties:
UserGroupId: example-users
Engine: redis
UserIds: [!Ref DefaultUser, !Ref AppUser]
Cluster:
Type: AWS::ElastiCache::CacheCluster
Properties:
Engine: redis
CacheNodeType: cache.t3.micro
NumCacheNodes: 1
CacheSubnetGroupName: !Ref SubnetGroup
Serverless:
Type: AWS::ElastiCache::ServerlessCache
Properties:
ServerlessCacheName: example-serverless
Engine: valkey
SubnetIds: [!Ref Subnet]
UserGroupId: !Ref UserGroup
Outputs:
ClusterEndpoint:
Value: !GetAtt Cluster.RedisEndpoint.Address
ServerlessEndpoint:
Value: !GetAtt Serverless.Endpoint.Addressaws --endpoint-url http://localhost:4566 cloudformation create-stack \
--stack-name elasticache-repro --template-body file://elasticache.yamlAWS Documentation
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticache-cachecluster.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticache-subnetgroup.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticache-user.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticache-usergroup.html
- https://docs.aws.amazon.com/AWSCloudFormation/latest/TemplateReference/aws-resource-elasticache-serverlesscache.html
- https://docs.aws.amazon.com/AmazonElastiCache/latest/APIReference/API_CreateServerlessCache.html
Why is this needed?
In AWS CDK, ElastiCache has only L1 constructs (CfnCacheCluster, CfnSubnetGroup, CfnUser, CfnUserGroup, CfnServerlessCache), so every CDK app that declares a Redis or Valkey cache emits these types. In strict mode the stack cannot deploy. In stub mode the application gets a stub value instead of a cache endpoint (RedisEndpoint.Address, Endpoint.Address), so nothing can connect.
Expected, matching AWS:
Refreturns the cluster ID, the subnet group name, the user ID, the user group ID and the serverless cache name.Fn::GetAttreturns the endpoint address and port attributes for the cluster and the serverless cache, andArnfor the user, user group and serverless cache.DeleteStackdeletes the caches first, then the user group, users and subnet group.
Are you willing to contribute a PR?
- Yes
- No
Activity
hectorvent commentedon Oct 17, 2026
All the ElastiCache types listed here are provisioned on main: cache clusters and subnet groups (#5307), users and user groups (#5422), and serverless caches (#5423, on top of the serverless APIs from #5366). Those PRs referenced this issue as "Part of", so it never closed on its own. Closing as done, thanks for the request!