ElastiCache Redis cache cluster has at rest encryption enabled
ElastiCache for Redis replication groups are evaluated for encryption at rest of on-disk cache data and backups. The finding pinpoints groups where this protection is not enabled.
Risk
Without at-rest encryption, cache files and snapshots can be read if storage or backups are accessed via compromise or misconfiguration. Secrets, tokens, and PII may be exposed, breaking confidentiality and aiding lateral movement through offline analysis of cached data.
Run this check with Prowler
Run in Prowler Cloudprowler aws --checks elasticache_redis_cluster_rest_encryption_enabledRecommendation
Enable encryption at rest on all Redis replication groups. Use customer-managed KMS keys, apply least-privilege access to keys, and audit key usage. Plan a controlled migration since at-rest encryption is enabled at creation (backup, restore, replace). Pair with in-transit encryption and authentication for defense in depth.
Remediation
Terraform
# Terraform: enable at-rest encryption for an ElastiCache Redis replication group
resource "aws_elasticache_replication_group" "<example_resource_name>" {
replication_group_id = "<example_resource_id>"
description = "Enable at-rest encryption"
node_type = "cache.t3.micro"
number_cache_clusters = 1
at_rest_encryption_enabled = true # CRITICAL: turns on encryption at rest for the replication group
}NativeIaC
# CloudFormation: enable at-rest encryption for an ElastiCache Redis replication group
Resources:
<example_resource_name>:
Type: AWS::ElastiCache::ReplicationGroup
Properties:
ReplicationGroupId: <example_resource_id>
ReplicationGroupDescription: Enable at-rest encryption
Engine: redis
CacheNodeType: cache.t3.micro
NumCacheClusters: 1
AtRestEncryptionEnabled: true # CRITICAL: turns on encryption at rest for the replication groupOther
Check Code
from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.elasticache.elasticache_client import (
elasticache_client,
)
class elasticache_redis_cluster_rest_encryption_enabled(Check):
def execute(self):
findings = []
for repl_group in elasticache_client.replication_groups.values():
report = Check_Report_AWS(metadata=self.metadata(), resource=repl_group)
report.status = "FAIL"
report.status_extended = f"Elasticache Redis cache cluster {repl_group.id} does not have at rest encryption enabled."
if repl_group.encrypted:
report.status = "PASS"
report.status_extended = f"Elasticache Redis cache cluster {repl_group.id} has at rest encryption enabled."
findings.append(report)
return findingsReferences
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/aws/ElastiCache/in-transit-and-at-rest-encryption.html
- https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/at-rest-encryption.html#at-rest-encryption-enable
- https://aws.amazon.com/blogs/security/amazon-elasticache-now-supports-encryption-for-elasticache-for-redis/