Open menu
-->

AWS ElastiCache Node Type Generation

Cloud Conformity allows you to automate the auditing process of this resolution page. Register for a 14 day evaluation and check your compliance level for free!

Start a Free Trial Product features
Cost
optimisation
Performance
efficiency

Risk level: Medium (should be achieved)

Ensure that all ElastiCache clusters provisioned within your AWS account are using the latest generation of nodes (instances) in order to get better performance at lower cost. ElastiCache is an AWS performance optimization service that makes it easy to add distributed in-memory caching to your web applications.

This rule resolution is part of the Cloud Conformity Cost Optimisation Package

Using the latest generation of Amazon ElastiCache nodes instead of the previous generation nodes will upgrade your clusters for higher hardware performance (faster CPUs, higher memory bandwidth, superior I/O and better network throughput), better support for latest Memcached and Redis in-memory engines versions and lower costs for compute power and network bandwidth. If you are currently using ElastiCache nodes from the previous generation, Cloud Conformity encourages you to upgrade these nodes to their latest generation equivalents (see Remediation/Resolution section table for more information).

Audit

The following table will help you to identify any previous generation ElastiCache node types in use:

ElastiCache Node FamilyElastiCache Previous Generation Node Types
Standardcache.m1.small | cache.m1.medium | cache.m1.large | cache.m1.xlarge
Memory Optimizedcache.m2.xlarge | cache.m2.2xlarge | cache.m2.4xlarge
Compute Optimizedcache.c1.xlarge
Microcache.t1.micro

To determine if your Amazon ElastiCache clusters are using node types from the previous generation, perform the following:

Using AWS Console

01 Login to the AWS Management Console.

02 Navigate to ElastiCache dashboard at https://console.aws.amazon.com/elasticache/.

03 In the left navigation panel, under ElastiCache Dashboard, click Memcached to access the clusters created with Memcached in-memory cache engine or Redis to access the clusters created with Redis engine.

04 Choose the Memcached/Redis cluster that you want to examine then click on its identifier link:

Choose the Memcached/Redis cluster that you want to examine then click on its identifier link

listed in the Name column.

05 On the selected cluster configuration page, select the Description tab and verify the Node type property value:

On the selected cluster configuration page, select the Description tab and verify the Node type property value

listed in the Cluster Details section. If the Node type value found is listed in the Audit section table, the selected Amazon ElastiCache cluster is using nodes from a previous generation, therefore an upgrade is highly recommended (see Remediation/Resolution section for the upgrade process).

06 Repeat step no. 4 and 5 to verify the nodes type for other ElastiCache clusters provisioned in the current region.

07 Change the AWS region from the navigation bar and repeat the audit process for other regions.

Using AWS CLI

01 Run describe-cache-clusters command (OSX/Linux/UNIX) using custom query filters to list the identifiers of all ElastiCache clusters available in the selected region:

aws elasticache describe-cache-clusters
	--region us-east-1
	--output table
	--query 'CacheClusters[*].CacheClusterId'

02 The command output should return a table with the requested cluster identifiers:

--------------------------
|  DescribeCacheClusters |
+------------------------+
|  mywebappcachecluster  |
|  memcachedcluster-001  |
|  rediscachecluster2    |
+------------------------+

03 Run again describe-cache-clusters command (OSX/Linux/UNIX) using the ID (identifier) of the cluster that you want to examine and the necessary query filters to expose the node(s) type used by the selected AWS ElastiCache cluster:

aws elasticache describe-cache-clusters
	--region us-east-1
	--cache-cluster-id mywebappcachecluster
	--query 'CacheClusters[*].CacheNodeType'

04 The command output should return the node type currently used:

[
    "cache.m1.medium"
]

If the value returned by the command output is listed in the Audit section table, the selected Amazon ElastiCache cluster is using nodes from a previous generation, therefore the upgrade to the newest generation is highly recommended.

05 Repeat step no. 3 and 4 for each ElastiCache cluster available in the current region.

06 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 - 5 to perform the audit process for other regions.

Remediation / Resolution

The following table will help you choose the equivalent current generation node type required for the upgrade process:

Previous Generation Node TypesCurrent Generation Node Types
cache.m1.medium | cache.m1.large | cache.m1.xlargecache.m3.medium | cache.m3.large | cache.m3.xlarge
cache.m2.xlarge | cache.m2.2xlarge | cache.m2.4xlarge cache.r3.large | cache.r3.xlarge | cache.r3.2xlarge
cache.t1.micro | cache.m1.smallcache.t2.micro | cache.t2.small

To upgrade your previous generation ElastiCache nodes to their latest generation equivalents, perform the following:

Using AWS Console

01 Login to the AWS Management Console.

02 Navigate to ElastiCache dashboard at https://console.aws.amazon.com/elasticache/.

03 In the left navigation panel, under ElastiCache Dashboard, click Memcached to access the clusters created with Memcached in-memory cache engine or Redis to access the clusters created with Redis engine.

04 Select the Memcached/Redis cluster that you want to upgrade (see Audit section part I to identify the right cluster) then click on the Modify button from the dashboard top menu.

05 In the Modify Cluster dialog box, perform the following actions:

  1. Select the node type equivalent from the Node Type dropdown list (consult the Remediation/Resolution section table to find the equivalent node type required).
  2. Select Apply Immediately checkbox to apply the configuration changes immediately.
    (!) IMPORTANT: when you upgrade the nodes type for an AWS ElastiCache cluster, an immediate outage will occur, process which clears all cache data in the cluster. If the selected cluster is used in production consider leaving Apply Immediately option disabled before applying the changes in order to avoid any performance issues. If Apply Immediately is not selected, the node type upgrade will be processed during the next maintenance window.
  3. Click Modify to apply the changes and upgrade the cluster nodes type. During the upgrade process the cluster status should change from available to modifying and back to available. Once the upgrade is complete, the cluster Node type property value should be updated as well.

06 Repeat steps no. 3 - 5 to upgrade the nodes type for other AWS ElastiCache clusters provisioned in the current region.

07 Change the AWS region from the navigation bar and repeat the entire process for other regions.

Using AWS CLI

01 Based on your Amazon ElastiCache cluster attachment to a replication group choose one of the following options:

  1. Modify an ElastiCache Memcached/Redis cluster that does not belong to a replication group:
    • Run modify-cache-cluster command (OSX/Linux/UNIX) to upgrade the selected AWS ElastiCache cluster node(s) type (see Audit section part II to identify the right cluster):
      aws elasticache modify-cache-cluster
      	--region us-east-1
      	--cache-cluster-id mywebappcachecluster
      	--cache-node-type cache.m3.medium
      	--apply-immediately
      
    • The command output should return the metadata of the cluster selected for upgrade:
      {
          "CacheCluster": {
              "Engine": "redis",
              "CacheParameterGroup": {
                  "CacheNodeIdsToReboot": [],
                  "CacheParameterGroupName": "default.redis3.2",
                  "ParameterApplyStatus": "in-sync"
              },
              "CacheClusterId": "mywebappcachecluster",
              "NumCacheNodes": 1,
              "AutoMinorVersionUpgrade": true,
              "CacheClusterStatus": "modifying",
      
      
              ...
      
              "CacheSubnetGroupName": "default",
              "EngineVersion": "3.2.4",
              "PendingModifiedValues": {
                  "CacheNodeType": "cache.m3.medium"
              },
              "PreferredMaintenanceWindow": "tue:03:00-tue:04:00",
              "CacheNodeType": "cache.m1.medium"
          }
      }
      
  2. Modify an AWS ElastiCache cluster (Redis engine only) that belongs to a replication group:
    • Run modify-replication-group command (OSX/Linux/UNIX) to upgrade the node(s) type for the selected ElastiCache replication group cluster:
      aws elasticache modify-replication-group
      	--region us-east-1
      	--replication-group-id mywebappcachecluster
      	--cache-node-type cache.m3.medium
      	--apply-immediately
      
    • The command output should return the metadata of the replication group cluster selected for upgrade:
      {
          "ReplicationGroup": {
              "Status": "modifying",
              "Description": "Redis Cache 2.8.6 Cluster",
              "NodeGroups": [
                  {
                      "Status": "modifying",
      
      
                      ...
      
      
                      "NodeGroupId": "0001"
                      }
                  }
              ],
              "ReplicationGroupId": "mywebappcachecluster",
              "AutomaticFailover": "enabled",
              "MemberClusters": [
                  "mywebappcachecluster-001",
                  "mywebappcachecluster-002",
                  "mywebappcachecluster-003"
              ],
              "PendingModifiedValues": {}
          }
      }
      

02 Repeat step no. 1 for each ElastiCache cluster or replication group that requires node type upgrade, available in the current region.

03 Change the AWS region by updating the --region command parameter value and repeat step no. 1 and 2 to perform the entire process for other regions.

References

Publication date Oct 19, 2016