Use the Conformity Knowledge Base AI to help improve your Cloud Posture

ElastiCache Reserved Cache Node Coverage

Trend Cloud One™ – Conformity is a continuous assurance tool that provides peace of mind for your cloud infrastructure, delivering over 1000 automated best practice checks.

Risk Level: Medium (should be achieved)

Ensure that the reservation coverage percentage (i.e. the percentage of node instance hours that a reservation covered) available for your Amazon ElastiCache Reserved Nodes (RNs) does not fall below a target threshold. Reserved Node (RN) coverage tracks the number of running node hours that are covered by reservations, and can be measured over a daily, monthly, quarterly, or yearly cadence. For example, you can monitor your RN coverage either at an aggregate level (e.g. monthly coverage of your entire Amazon ElastiCache RN fleet) or at a more granular level of detail (e.g. monthly coverage of Amazon ElastiCache cache.m4.large nodes running within Asia Pacific - Tokyo region). The reservation coverage threshold (percentage) and the time period to retrieve the reservation coverage data for, must be defined in the conformity rule settings, in the Trend Cloud One™ – Conformity account.

This rule can help you work with the AWS Well-Architected Framework.

Cost
optimisation

Amazon ElastiCache node reservations provide a significant discounted hourly rate (up to 75%) compared to On-Demand pricing, helping you to cut down on your ElastiCache costs. The Reserved Node (RN) coverage report produced by Amazon Cost Management service allows you to discover how much of your overall ElastiCache node usage is covered by RNs, so that you can make informed decisions about when to purchase or modify a Reserved Node to ensure maximum reservation coverage. The Cost Management service provides effective recommendations for which reservations to purchase in order to help you reduce your Amazon ElastiCache costs.


Audit

To determine if the reservation coverage (percentage) of your Amazon ElastiCache Reserved Nodes fall below your target coverage, perform the following actions:

Using AWS Console

01 Sign in to your Trend Cloud One™ – Conformity account, access ElastiCache Reserved Cache Node Coverage conformity rule settings and identify the Amazon ElastiCache reservation coverage threshold (percentage) defined for the specified period of time, configured for your AWS cloud account.

02 Sign in to the AWS Management Console.

03 Navigate to Billing and Cost Management console available at https://console.aws.amazon.com/cost-management/home.

04 In the main navigation panel, under Savings and Commitments, select Reservations, and choose Coverage report to access the reservation coverage report provided by Amazon Cost Management service for your AWS account. This helps you identify opportunities for cost savings when it comes to Reserved Nodes (RNs).

05 On the Coverage report page, in the Report parameters section, perform the following operations:

  1. For Time, use the date/time picker, and choose the time frame to retrieve data about your reservation coverage (daily, monthly, quarterly or yearly) as specified in the conformity rule settings, identified at step no. 1. Once the appropriate time frame is selected, choose Apply to show the reservation coverage for that period.
  2. For Service choose ElastiCache.

06 Check the reservation coverage (percentage) displayed under Average Coverage (hours), in the Reservations coverage graph section. If the reservation coverage (percentage) is lower than the target coverage threshold identified at step no. 1, the reservation coverage for your Amazon ElastiCache Reserved Nodes (RNs) falls below your target coverage, therefore, actions must be taken to ensure maximum coverage.

07 If required, repeat step no. 1 – 6 determine the Amazon ElastiCache reservation coverage for other AWS cloud accounts.

Using AWS CLI

01 Sign in to your Trend Cloud One™ – Conformity account, access ElastiCache Reserved Cache Node Coverage conformity rule settings and identify the Amazon ElastiCache reservation coverage threshold (percentage) defined for the specified period of time, configured for your AWS cloud account.

02 Define the AWS service for which to return the reservation coverage, i.e. Amazon ElastiCache. Save the following configuration document to a JSON file named aws-service-filter.json:

{
	"Dimensions": {
		"Key": "SERVICE",
		"Values": [ "Amazon ElastiCache" ]
	}
}

03 Run get-reservation-coverage command (OSX/Linux/UNIX) with the filter configuration document created at the previous step as value for the --filter command parameter, to obtain the reservation coverage for your Amazon ElastiCache Reserved Nodes (RNs), for the specified period of time. The --time-period parameter value indicates the start and end dates of the period that you want to retrieve data about reservation coverage for, and must match the time frame defined for the target threshold, identified at step no. 1:

aws ce get-reservation-coverage
  --time-period Start=2024-05-25,End=2024-05-25
  --granularity MONTHLY
  --filter file://aws-service-filter.json
  --query 'CoveragesByTime[*].Total.CoverageHours.CoverageHoursPercentage'

04 The command output should return the requested reservation coverage (percentage):

[
    "75"
]

If the reservation coverage (percentage) returned by the get-reservation-coverage command output is lower than the target coverage threshold identified at step no. 1, the reservation coverage for your Amazon ElastiCache Reserved Nodes (RNs) falls below your target coverage, therefore, actions must be taken to ensure maximum coverage.

05 If required, repeat step no. 1 – 4 determine the Amazon ElastiCache reservation coverage for other AWS accounts.

Remediation / Resolution

To ensure maximum reservation coverage for your ElastiCache Reserved Nodes (RNs), follow the context-aware RN purchase recommendations provided by Amazon Cost Management service to optimize your AWS costs by performing the following actions:

Using AWS Console

01 Sign in to the AWS Management Console.

02 Navigate to Billing and Cost Management console available at https://console.aws.amazon.com/cost-management/home.

03 In the main navigation panel, under Savings and Commitments, select Reservations, and choose Recommendations to access the Reserved Node (RN) purchase recommendations provided by Amazon Cost Management. These recommendations are based on your past usage and indicate opportunities to maximize your cost savings as compared to On-Demand usage.

04 In the Recommendation parameters section, select the required RN attributes and adjust the usage time period for which your purchase recommendations should be calculated:

  1. For Service, choose ElastiCache to show purchase recommendations for Amazon ElastiCache nodes only.
  2. For Recommendation level, choose Payer.
  3. For Term, select the length of the RN reservation that you want recommendations for.
  4. For Payment option, choose whether you want to pay for recommended RNs upfront.
  5. For Based on the past, select the number of previous days that you want AWS to consider when it calculates your RN recommendations.
  6. After all the required parameters are provided, you can see all the Reserved Node (RN) purchase recommendations made by Amazon Cost Management in the Recommendations section. Cost Management service recommends the smallest size node available in a node family. This makes it easier to purchase a size-flexible Reserved Nodes. The service also shows the equal number of normalized units so that you can purchase any node size that you want. For example, your RN purchase recommendation would be for cache.m5.large because that is the smallest size cache node in the M5 family.

05 To adopt the RN recommendations provided by Amazon Cost Management service at the previous step and purchase new ElastiCache Reserved Nodes (RNs), navigate to Amazon ElastiCache console at https://console.aws.amazon.com/elasticache.

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

07 Choose Purchase reserved nodes from the console menu to initiate the purchasing process.

08 In the Reserved nodes settings section, specify the necessary Reserved Node offering details, based on the purchase recommendations provided by the Cost Management service at step no 4:

  1. For Engine, choose the cache engine used by your ElastiCache cluster nodes.
  2. For Node type, select the required cluster 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.

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

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

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

12 If required, repeat steps no. 7 – 11 to purchase more Amazon ElastiCache Reserved Nodes as specified in the RN purchase recommendations list provided by Amazon Cost Management.

13 Repeat step no. 1 – 12 to perform the Remediation process for other AWS accounts.

Using AWS CLI

01 Run get-reservation-purchase-recommendation command (OSX/Linux/UNIX) with custom query filters to get recommendations for which Amazon ElastiCache Reserved Nodes to purchase. These recommendations are based on your past usage and indicate opportunities to maximize your cost savings as compared to On-Demand usage. The following command request example retrieves purchase recommendations for All Upfront ElastiCache nodes with one-year term, based on the last 30 days of Amazon ElastiCache usage:

aws ce get-reservation-purchase-recommendation
  --service "Amazon ElastiCache"
  --lookback-period-in-days THIRTY_DAYS
  --term-in-years ONE_YEAR
  --payment-option ALL_UPFRONT
  --query 'Recommendations[*].RecommendationDetails[]'

02 The command output should return the Amazon ElastiCache RN purchase recommendation(s) provided by Amazon Cost Management service for your AWS account. AWS recommends the smallest size node in a node family. This makes it easier to purchase a size-flexible Reserved Node. For example, the following command output describes one RN purchase recommendation for cache.m4.large cache nodes:

[
	{
		"AverageUtilization": "100.0000000000",
		"RecurringStandardMonthlyCost": "0.0000000000",
		"MinimumNumberOfNodesUsedPerHour": "2.0000000000",
		"NodeDetails": {
			"ElastiCacheInstanceDetails": {
				"Family": "m5",
				"ProductDescription": "redis",
				"SizeFlexEligible": true,
				"CurrentGeneration": true,
				"Region": "Asia Pacific (Sydney)",
				"NodeType": "cache.m5.large"
			}
		},
		"EstimatedMonthlySavingsAmount": "103.9558887800",
		"AverageNumberOfNodesUsedPerHour": "2.0000000000",
		"EstimatedBreakEvenInMonths": "29.0568700700",
		"CurrencyCode": "USD",
		"EstimatedMonthlySavingsPercentage": "45.0000",
		"UpfrontCost": "446.0000000000",
		"MaximumNormalizedUnitsUsedPerHour": "1.0000000000",
		"MaximumNumberOfNodesUsedPerHour": "2.0000000000",
		"RecommendedNumberOfNodesToPurchase": "2",
		"EstimatedMonthlyOnDemandCost": "186.2750000000",
		"EstimatedReservationCostForLookbackPeriod": "60.1780820000",
		"RecommendedNormalizedUnitsToPurchase": "1.0",
		"AverageNormalizedUnitsUsedPerHour": "1.0000000000",
		"AccountId": "123456789012",
		"MinimumNormalizedUnitsUsedPerHour": "1.0000000000"
	}
]

03 Run describe-reserved-cache-nodes-offerings command (OSX/Linux/UNIX) to obtain the pricing details and information about the available Amazon ElastiCache Reserved Node offerings, based on the RN purchase recommendations provided by Amazon Cost Management at the previous step:

aws elasticache describe-reserved-cache-nodes-offerings
  --region ap-southeast-2
  --cache-node-type cache.m5.large
  --product-description redis
  --offering-type "Heavy Utilization"
  --duration 31536000

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

{
	"ReservedCacheNodesOfferings": [
		{
			"OfferingType": "Heavy Utilization",
			"FixedPrice": 446.0,
			"ReservedCacheNodesOfferingId": "abcd1234-abcd-1234-abcd-1234abcd1234",
			"UsagePrice": 0.0,
			"RecurringCharges": [
				{
					"RecurringChargeAmount": 0.08,
					"RecurringChargeFrequency": "Hourly"
				}
			],
			"ProductDescription": "redis",
			"Duration": 31536000,
			"CacheNodeType": "cache.m5.large"
		}
	]
}

05 Run purchase-reserved-cache-nodes-offering command (OSX/Linux/UNIX) with the ID of the RN offering that you want to use (i.e. "ReservedCacheNodesOfferingId" attribute value), to purchase Amazon ElastiCache Reserved Nodes based on the offering information returned at the previous step:

aws elasticache purchase-reserved-cache-nodes-offering
  --region ap-southeast-2
  --reserved-cache-nodes-offering-id abcd1234-abcd-1234-abcd-1234abcd1234
  --cache-node-count 2

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

{
	"ReservedCacheNode": [
		{
			"ReservedCacheNodesOfferingId":
			"abcd1234-abcd-1234-abcd-1234abcd1234",
			"CacheNodeType": "cache.m5.large",
			"StartTime ": "2024-05-25T15:00:00.000Z",
			"Duration": 31536000,
			"FixedPrice": 446.0,
			"UsagePrice": 0.0,
			"CacheNodeCount": 2,
			"ProductDescription": "redis",
			"OfferingType": "Heavy Utilization",
			"RecurringCharges": [
				{
					"RecurringChargeAmount": 0.08,
					"RecurringChargeFrequency": "Hourly"
				}
			],
			"State": "payment-pending"
		}
	]
}

07 If required, repeat steps no. 3 – 6 to purchase more Amazon ElastiCache Reserved Nodes as specified in the RN purchase recommendations list provided by Amazon Cost Management.

08 Repeat step no. 1 – 7 to perform the entire Remediation process for other AWS accounts.

References

Publication date Nov 24, 2020