Use the Knowledge Base AI to help improve your Cloud Posture

AWS ElastiCache Reserved Cache Nodes Purchase Recommendations

Trend Vision One™ provides continuous assurance that gives peace of mind for your cloud infrastructure, delivering over 1100 automated best practice checks.

Risk Level: Medium (should be achieved)

Identify any Amazon ElastiCache cluster nodes that can be upgraded to Reserved Nodes (RNs) and follow the Trend Cloud One™ – Conformity recommendations for purchasing RNs in order to receive a significant discount on the hourly charges. Reserved Nodes represent an AWS billing concept that enables discounted hourly rates for compute capacity in exchange of reserving a certain amount of compute usage upfront. The cost savings when using Reserved Nodes over On-Demand nodes depend on the commitment term (1-year or 3-years) and the offering type used.

Cost
optimisation

Reserved Nodes (RNs) represent a good strategy to cut down on Amazon ElastiCache service costs but purchasing them without a plan can feel like a risky process. The purchasing recommendations outlined in this conformity rule will help you optimize your RNs spending and save money by using only what you need.

Note: In order to verify the current status of purchased reserved capacity and provide accurate recommendations, Conformity needs access to the AWS payer account (the account designated to pay the bills) or to AWS individual accounts. The following IAM policy allows the Conformity engine to view all the reserved ElastiCache cluster nodes available in your account(s):


{
	"Version": "2012-10-17",
	"Statement": [
		{
			"Effect": "Allow",
			"Action": [
				"elasticache:DescribeReservedCacheNodes"
			],
			"Resource": "*"
		}
	]
}

Audit

To verify your existing Amazon ElastiCache compute capacity and determine if there are any candidates for upgrading to Reserved Nodes (RNs), perform the following actions:

Using AWS Console

01 Sign in to the AWS Management Console.

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

03 In the main navigation panel, under Resources, choose Redis caches to access the cache clusters created with Redis or Memcached caches to access the cache clusters created with Memcached.

04 Click on the name (link) of the Redis/Memcached cache cluster that you want to examine.

05 Check the configuration information available in the Cluster details section to determine the ElastiCache cluster role within the application stack. If the selected cache cluster is not a component of an application stack that is about to be decommissioned soon and the cluster will run for at least 6 months, the verified Amazon ElastiCache cache cluster is stable and the cluster nodes can be upgraded to Reserved Nodes (RNs).

06 Repeat steps no. 4 and 5 for each Amazon ElastiCache cluster available within the current AWS region.

07 Change the AWS cloud 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) to list the identifier (name) of each Amazon ElastiCache cluster available in the selected AWS cloud 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 names:

-------------------------------------
|       DescribeCacheClusters       |
+-----------------------------------+
|  cc-production-memcache-cluster   |
|  cc-production-redis-cluster-001  |
|  cc-production-redis-cluster-002  |
+-----------------------------------+

03 Run again describe-cache-clusters command (OSX/Linux/UNIX) to describe the configuration information available for the Amazon ElastiCache cache cluster that you want to examine:

aws elasticache describe-cache-clusters
  --region us-east-1
  --cache-cluster-id cc-production-memcache-cluster
  --query 'CacheClusters'

04 The command output should return the requested configuration information:

[
	{
		"CacheClusterId": "cc-production-memcache-cluster",
		"ConfigurationEndpoint": {
			"Address": "cc-production-memcache-cluster.abcabc.cfg.use1.cache.amazonaws.com",
			"Port": 11211
		},
		"ClientDownloadLandingPage": "https://console.aws.amazon.com/elasticache/home#client-download:",
		"CacheNodeType": "cache.t3.medium",
		"Engine": "memcached",
		"EngineVersion": "1.6.22",
		"CacheClusterStatus": "available",
		"NumCacheNodes": 1,
		"PreferredAvailabilityZone": "us-east-1e",
		"CacheClusterCreateTime": "2024-05-20T12:06:23.868000+00:00",
		"PreferredMaintenanceWindow": "wed:04:00-wed:05:00",
		"PendingModifiedValues": {},
		"CacheSecurityGroups": [],
		"CacheParameterGroup": {
			"CacheParameterGroupName": "default.memcached1.5",
			"ParameterApplyStatus": "in-sync",
			"CacheNodeIdsToReboot": []
		},
		"CacheSubnetGroupName": "cc-memcached-cluster-sg",
		"AutoMinorVersionUpgrade": true,
		"AuthTokenEnabled": false,
		"TransitEncryptionEnabled": false,
		"AtRestEncryptionEnabled": false,
		"ARN": "arn:aws:elasticache:us-east-1:123456789012:cluster:cc-production-memcache-cluster",
		"ReplicationGroupLogDeliveryEnabled": false,
		"LogDeliveryConfigurations": []
	}
]

05 Check the cluster configuration information returned by the describe-cache-clusters command output at the previous step to determine the cache cluster role within the application stack. If the selected Amazon ElastiCache cluster is not a component of an application stack that is about to be decommissioned and the cluster will run for at least 6 months, the verified cache cluster is stable and the cluster nodes can be upgraded to Reserved Nodes (RNs).

06 Repeat steps no. 3 – 5 for each ElastiCache cache cluster provisioned in the selected AWS region.

07 Change the AWS region by updating the --region command parameter value and repeat steps no. 1 – 6 to perform the Audit process for other regions.

Remediation / Resolution

To upgrade your eligible On-Demand ElastiCache cluster nodes to Reserved Nodes (RNs) you must purchase RNs without paying for resources that you don't need. To make the reservation based on the right pricing model, the right node size, and the right platform, follow the recommendations outlined below:

Recommendations

01 Commitment Term – choose carefully the commitment period based on your application requirements because you will be charged for every hour during the entire reservation term that you select, regardless of whether the ElastiCache cluster is running or not. AWS provides two types of commitment terms:

  1. 1-year term – the reservation is made for 1 year and it's useful for predictable workloads that don't require vertical scaling. This provides lower discount rate when compared with the 3-year term.
  2. 3-year term – the reservation is made for 3 years, it's useful for long-running applications and web services that don't require vertical scaling, and provides higher discount rate.

02 Offering Type – provides you the ability to balance the amount you pay upfront with the effective hourly price. There are three offering types to choose from:

  1. Light Utilization - this type is ideal for cache nodes with sporadic usage, e.g. development and staging nodes that run for less than 12 hours a day or nodes used for short term projects. With this offering type you can save up to 42% for a 1-year term and 56% for a 3-year term when compared with the same cache nodes that use On-Demand pricing model.
  2. Medium Utilization - for this type you have a higher upfront payment when compared with Light Utilization but a much lower hourly usage rate. The Medium Utilization Reserved Cache Nodes are best suited for workloads that are active most of the time. With this offering type you can save up to 47% for a 1-year term and 64% for a 3-year term when compared with the same cache nodes that use On-Demand pricing model.
  3. Heavy Utilization - this type is suited for production applications that rely heavily on caching, e.g. steady-state production workloads that need to be highly available 24×7. With Heavy Utilization Reserved Cache Nodes you can save up to 52% for a 1-year term and 70% for a 3-year term when compared with the same cache nodes that use On-Demand pricing model.

03 Consolidated Billing – using Consolidated Billing is recommended when you own multiple accounts because the AWS billing engine treats all your accounts as a single account for billing purposes (designated payer account), resulting in the lowest possible bill as the applicable discounts are spread across all accounts. For instance, the Reserved Nodes purchased in one AWS cloud account can share their reservations with other AWS accounts available in the same billing family. The purchase recommendations are based on the previous calendar month's hour-by-hour usage aggregated across all consolidated billing accounts. For example, if you have two RNs in the same AWS region with the same attributes, the AWS billing system checks each hour for the total number of running nodes that match those attributes. If there are two nodes or less, you will be charged the Reserved Node rate for each matching node running that hour. If more than two are running, you will be charged the On-Demand rate for the additional node(s).

04 Purchasing Process – is important to review carefully the shopping cart details before the purchase. After your purchase is confirmed, it can't be cancelled so make sure the parameters displayed on the Reserved Node shopping cart page are accurate.

Case A: To upgrade to Reserved Nodes (RNs), you must purchase the appropriate RNs in the same AWS region, using the same attributes as your active On-demand nodes, and the billing will be automatically changed to reflect the reserved rates. To buy the required RNs, perform the following actions:

Using AWS Console

01 Sign in to the AWS Management Console.

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

03 In the main navigation panel, under Resources, choose Reserved nodes.

04 Choose Purchase reserved nodes from the console menu to initiate the Reserved Node (RN) purchasing process.

05 In the Reserved nodes settings section, provide the following information:

  1. For Engine, choose the cache engine used by your ElastiCache cluster nodes.
  2. For Node type, select the required cluster node type (must match the On-Demand node type).
  3. For Term, select the length of time you want the cluster node(s) reserved.
  4. For Offering type, choose the preferred offering type (e.g. Partial upfront).

06 In the Reservation details section, provide the number of nodes that you want to purchase in the Number of nodes box.

07 In the Tags section, configure tags to search and filter your Reserved Nodes or track your AWS costs.

08 Choose Purchase to purchase your new Amazon ElastiCache Reserved Node(s). Once the order is processed, the node(s) status will change to Active.

09 Repeat steps no. 4 – 8 to upgrade other On-Demand cluster nodes provisioned within the current AWS region by purchasing ElastiCache Reserved Nodes that match their configuration.

10 Change the AWS cloud region from the console navigation bar and repeat the Remediation process for other regions.

Using AWS CLI

01 Before you purchase your Amazon ElastiCache Reserved Node(s), run describe-reserved-cache-nodes-offerings command (OSX/Linux/UNIX) to obtain the pricing information available for the RN offering(s). Use the command parameters provided in the following example to match the specifications of the active ElastiCache nodes that you want to upgrade to RNs:

aws elasticache describe-reserved-cache-nodes-offerings
  --region us-east-1
  --cache-node-type cache.t3.medium
  --duration 31536000
  --product-description memcached
  --offering-type "All Upfront"

02 The command output should return the requested offering information (including the Reserved Cache Node offering ID):

{
	"ReservedCacheNodesOfferings": [
		{
			"ReservedCacheNodesOfferingId": "abcd1234-abcd-1234-abcd-1234abcd1234",
			"CacheNodeType": "cache.t3.medium",
			"Duration": 31536000,
			"FixedPrice": 379.0,
			"UsagePrice": 0.0,
			"ProductDescription": "memcached",
			"OfferingType": "All Upfront",
			"RecurringCharges": [
				{
					"RecurringChargeAmount": 0.0,
					"RecurringChargeFrequency": "Hourly"
				}
			]
		}
	]
}

03 Run purchase-reserved-cache-nodes-offering command (OSX/Linux/UNIX) to purchase your ElastiCache Reserved Nodes (RNs) based on the offering information returned at the previous step. Make sure that you use the right offering ID, the offering that match your active cluster node configuration:

aws elasticache purchase-reserved-cache-nodes-offering
  --region us-east-1
  --reserved-cache-nodes-offering-id abcd1234-abcd-1234-abcd-1234abcd1234
  --cache-node-count 2

04 The command output should return the metadata available for your new Amazon ElastiCache Reserved Nodes (RNs):

{
	"ReservedCacheNode": [
		{
			"ReservedCacheNodesOfferingId": "abcd1234-abcd-1234-abcd-1234abcd1234",
			"CacheNodeType": "cache.t3.medium",
			"StartTime ": "2024-05-21T16:17:09.000Z",
			"Duration": 31536000,
			"FixedPrice": 379.0,
			"UsagePrice": 0.0,
			"CacheNodeCount": 2,
			"ProductDescription": "memcached",
			"OfferingType": "All Upfront",
			"RecurringCharges": [
				{
					"RecurringChargeAmount": 0.047,
					"RecurringChargeFrequency": "Hourly"
				}
			],
			"State": "payment-pending"
		}
	]
}

05 Repeat steps no. 1 – 4 to upgrade other On-Demand cluster nodes provisioned in the selected AWS region by purchasing ElastiCache Reserved Nodes that match their configuration.

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

Case B: To renew your existing ElastiCache Reserved Nodes (RNs), you need to repurchase them using the same configuration attributes (AWS region, node type, term, and so on). The Amazon ElastiCache RNs are not renewed automatically, therefore you must repurchase your existing RNs in order to avoid On-Demand rate charges when the current reservations expire. To repurchase your Reserved Nodes, perform the following actions:

Using AWS Console

01 Sign in to the AWS Management Console.

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

03 In the main navigation panel, under Resources, choose Reserved nodes.

04 Click on the ID (link) of the Amazon ElastiCache Reserved Node that you want to renew and identify the node configuration attributes (i.e. node type, cache engine, term, offering type, etc.).

05 Navigate back to the Reserved nodes page and choose Purchase reserved nodes from the console menu to initiate the purchasing process.

06 In the Reserved nodes settings section, provide the following information:

  1. For Engine, choose the cache engine used by the cluster nodes that you want to renew.
  2. For Node type, select the required cluster node type (must match the On-Demand node type).
  3. For Term, select the length of time you want the cluster node(s) reserved.
  4. For Offering type, choose the preferred offering type (e.g. Partial upfront).
  5. For Reserved node ID – optional, type the ElastiCache Reserved Node identifier that you want to renew (repurchase).

07 In the Reservation details section, provide the number of nodes that you want to purchase in the Number of nodes box.

08 In the Tags section, configure tags to search and filter your Reserved Nodes or track your AWS costs.

09 Choose Purchase to repurchase your Amazon ElastiCache Reserved Node(s).

10 Repeat steps no. 4 – 9 to renew (repurchase) other Amazon ElastiCache Reserved Nodes available within the current region.

11 Change the AWS cloud region from the console navigation bar and repeat the Remediation process for other regions.

Using AWS CLI

01 Run describe-reserved-cache-nodes command (OSX/Linux/UNIX) with the ID of the ElastiCache Reserved Node (RN) that you want to renew as the identifier parameter, to describe the RN offering identifier:

aws elasticache describe-reserved-cache-nodes
  --region us-east-1
  --reserved-cache-node-id abcdabcd-abcd-abcd-abcd-1234abcd1234
  --query 'ReservedCacheNodes[*].ReservedCacheNodesOfferingId'

02 The command output should return the requested RN offering identifier (ID):

[
	"abcd1234-abcd-1234-abcd-1234abcd1234"
]

03 Run describe-reserved-cache-nodes-offerings command (OSX/Linux/UNIX) to get pricing information for any available Amazon ElastiCache RN offerings. Use the offering ID returned at the previous step as the identifier parameter to match the specifications of the RN that you want to renew (repurchase):

aws elasticache describe-reserved-cache-nodes-offerings
  --region us-east-1
  --reserved-cache-nodes-offering-id abcd1234-abcd-1234-abcd-1234abcd1234

04 The command output should return the requested offering information:

[
	{
		"ReservedCacheNodesOfferingId": "abcd1234-abcd-1234-abcd-1234abcd1234",
		"CacheNodeType": "cache.t3.medium",
		"Duration": 31536000,
		"FixedPrice": 379.0,
		"UsagePrice": 0.0,
		"ProductDescription": "memcached",
		"OfferingType": "All Upfront",
		"RecurringCharges": [
			{
				"RecurringChargeAmount": 0.0,
				"RecurringChargeFrequency": "Hourly"
			}
		]
	}
]

05 Run purchase-reserved-cache-nodes-offering command (OSX/Linux/UNIX) to purchase Amazon ElastiCache Reserved Nodes based on the offering information (i.e. offering ID) returned at the previous step:

aws elasticache purchase-reserved-cache-nodes-offering
  --region us-east-1
  --reserved-cache-nodes-offering-id abcd1234-abcd-1234-abcd-1234abcd1234
  --cache-node-count 2

06 The command output should return the metadata available for your new Amazon ElastiCache Reserved Nodes (RNs):

{
	"ReservedCacheNode": [
		{
			"ReservedCacheNodesOfferingId": "abcd1234-abcd-1234-abcd-1234abcd1234",
			"CacheNodeType": "cache.t3.medium",
			"StartTime ": "2024-05-22T14:17:09.000Z",
			"Duration": 31536000,
			"FixedPrice": 379.0,
			"UsagePrice": 0.0,
			"CacheNodeCount": 2,
			"ProductDescription": "memcached",
			"OfferingType": "All Upfront",
			"RecurringCharges": [
				{
					"RecurringChargeAmount": 0.047,
					"RecurringChargeFrequency": "Hourly"
				}
			],
			"State": "payment-pending"
		}
	]
}

07 Repeat steps no. 1 – 6 to renew (repurchase) other Amazon ElastiCache Reserved Nodes available in the selected AWS region.

08 Change the AWS cloud region by updating the --region command parameter value and repeat the Remediation process for other regions.

References

Publication date Dec 3, 2016