MEDIUM
Source
Trivy
ID
AVD-AWS-0050

Redis cluster should have backup retention turned on

Redis clusters should have a snapshot retention time to ensure that they are backed up and can be restored if required.

Impact

Follow the appropriate remediation steps below to resolve the issue.

Configure snapshot retention for redis cluster

1
2
3
4
5
6
7
Resources:
  GoodExample:
    Type: AWS::ElastiCache::CacheCluster
    Properties:
      CacheNodeType: cache.m3.medium
      Engine: redis
      SnapshotRetentionLimit: 7
1
2
3
4
5
6
Resources:
  GoodExample:
    Type: AWS::ElastiCache::CacheCluster
    Properties:
      Engine: redis
      CacheNodeType: cache.t1.micro
1
2
3
4
5
Resources:
  GoodExample:
    Type: AWS::ElastiCache::CacheCluster
    Properties:
      Engine: memcached

Configure snapshot retention for redis cluster

1
2
3
4
5
resource "aws_elasticache_cluster" "good_example" {
  engine                   = "redis"
  node_type                = "cache.m4.large"
  snapshot_retention_limit = 5
}
1
2
3
4
resource "aws_elasticache_cluster" "good_example" {
  engine    = "memcached"
  node_type = "cache.m4.large"
}
1
2
3
4
resource "aws_elasticache_cluster" "good_example" {
  engine    = "redis"
  node_type = "cache.t1.micro"
}