Ensure that the latest version of Memcached is used for your AWS ElastiCache clusters
Maintain optimal performance and security by mandating the use of the most up-to-date Memcached version for your AWS ElastiCache clusters.
Risk Level: Low
Cloud Entity: Amazon ElastiCache
CloudGuard Rule ID: D9.AWS.OPE.28
Covered by Spectral: No
Category: Database
GSL LOGIC
ElastiCache where engine='memcached' should have engineVersion>='1.6.17'
REMEDIATION
From Portal
- Sign in to the AWS Management Console.
- Navigate to ElastiCache dashboard at https://console.aws.amazon.com/elasticache/.
- Go into the 'Memcached' clusters tab in the left section.
- For every cluster listed, click on it's name. Check the version in the 'Engine version'. If the version is under 1.6.17, its not the latest version - thus needs to be modified.
- Click on the 'Modify' button in the top left corner of the page, and then scroll until you reach the 'Cluster settings' tab.
- Click the 'Engine version' button, and select the first one.
- Click on 'Preview changes' at the bottom of the page.
- Make sure you select the 'Apply immediately' checkbox. Then press 'Modify' at the bottom of the page.
- Repeat these steps for every cluster that doesn't have the latest version of the engine, and don't forget to check your other regions as well.
From TF
To change the Memcached cluster's engine version, use the following keys template:
resource 'aws_elasticache_cluster' 'example_memcached' {
...
engine = 'memcached'
...
engine_version = '1.6.17'
}
From Command Line
- To check for the engine version in the every cluster in a specific region, run the following command:
aws elasticache describe-cache-clusters --region EXAMPLE_REGION_NAME --output table --query 'CacheClusters[*].[CacheClusterId, Engine, EngineVersion]'
- If any memcached cluster's engine version is not 1.6.17, run the following command (using the first column's value as the cluster id):
aws elasticache modify-cache-cluster --region EXAMPLE_REGION_NAME --cache-cluster-id EXAMPLE_MEMCACHED_ID --engine-version 1.6.17 --apply-immediately
- Repeat these steps for every cluster that doesn't have the latest version of the engine, and don't forget to check your other regions as well.
References
- https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/WhatIs.html
- https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/Clusters.Modify.html#Clusters.Modify.CLI
- https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/VersionManagement.html
- https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/elasticache_cluster
Amazon ElastiCache
Amazon ElastiCache offers fully managed Redis and Memcached. Seamlessly deploy, operate, and scale popular open source compatible in-memory data stores. Build data-intensive apps or improve the performance of your existing apps by retrieving data from high throughput and low latency in-memory data stores. Amazon ElastiCache is a popular choice for Gaming, Ad-Tech, Financial Services, Healthcare, and IoT apps.
Compliance Frameworks
- CloudGuard AWS All Rules Ruleset
Updated over 1 year ago