Skip to main content

recommendations

Creates, updates, deletes, gets or lists a recommendations resource.

Overview

Namerecommendations
TypeResource
Idaws.cost_optimization_hub.recommendations

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
account_idstringThe account to which the recommendation applies.
action_typestringThe type of action you can take by adopting the recommendation. (Rightsize, Stop, Upgrade, PurchaseSavingsPlans, PurchaseReservedInstances, MigrateToGraviton, Delete, ScaleIn)
cost_calculation_lookback_period_in_daysintegerThe lookback period used to calculate cost impact for a recommendation.
currency_codestringThe currency code used for the recommendation.
current_resource_detailsobjectThe details for the resource.
current_resource_typestringThe type of resource. (Ec2Instance, LambdaFunction, EbsVolume, EcsService, Ec2AutoScalingGroup, Ec2InstanceSavingsPlans, ComputeSavingsPlans, SageMakerSavingsPlans, Ec2ReservedInstances, RdsReservedInstances, OpenSearchReservedInstances, RedshiftReservedInstances, ElastiCacheReservedInstances, RdsDbInstanceStorage, RdsDbInstance, AuroraDbClusterStorage, DynamoDbReservedCapacity, MemoryDbReservedInstances, NatGateway, DynamoDBTable, ElastiCacheCluster, MemoryDBCluster, DocumentDBCluster, WorkSpaces, SageMakerEndpoint)
estimated_monthly_costnumber (double)The estimated monthly cost of the current resource. For Reserved Instances and Savings Plans, it refers to the cost for eligible usage.
estimated_monthly_savingsnumber (double)The estimated monthly savings amount for the recommendation.
estimated_savings_over_cost_calculation_lookback_periodnumber (double)The estimated savings amount over the lookback period used to calculate cost impact for a recommendation.
estimated_savings_percentagenumber (double)The estimated savings percentage relative to the total cost over the cost calculation lookback period.
implementation_effortstringThe effort required to implement the recommendation. (VeryLow, Low, Medium, High, VeryHigh)
last_refresh_timestampstring (date-time)The time when the recommendation was last generated.
recommendation_idstringThe ID for the recommendation.
recommendation_lookback_period_in_daysintegerThe lookback period that's used to generate the recommendation.
recommended_resource_detailsobjectThe details about the recommended resource.
recommended_resource_typestringThe resource type of the recommendation. (Ec2Instance, LambdaFunction, EbsVolume, EcsService, Ec2AutoScalingGroup, Ec2InstanceSavingsPlans, ComputeSavingsPlans, SageMakerSavingsPlans, Ec2ReservedInstances, RdsReservedInstances, OpenSearchReservedInstances, RedshiftReservedInstances, ElastiCacheReservedInstances, RdsDbInstanceStorage, RdsDbInstance, AuroraDbClusterStorage, DynamoDbReservedCapacity, MemoryDbReservedInstances, NatGateway, DynamoDBTable, ElastiCacheCluster, MemoryDBCluster, DocumentDBCluster, WorkSpaces, SageMakerEndpoint)
regionstringThe Amazon Web Services Region of the resource.
resource_arnstringThe Amazon Resource Name (ARN) of the resource.
resource_idstringThe unique identifier for the resource. This is the same as the Amazon Resource Name (ARN), if available.
restart_neededbooleanWhether or not implementing the recommendation requires a restart.
rollback_possiblebooleanWhether or not implementing the recommendation can be rolled back.
sourcestringThe source of the recommendation. (ComputeOptimizer, CostExplorer)
tagsarrayA list of tags associated with the resource for which the recommendation exists.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_recommendationselectregionReturns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationId is only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve the recommendationId, use the ListRecommendations API.
list_recommendationsselectregionReturns a list of recommendations.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns both the current and recommended resource configuration and the estimated cost impact for a recommendation. The recommendationId is only valid for up to a maximum of 24 hours as recommendations are refreshed daily. To retrieve the recommendationId, use the ListRecommendations API.

SELECT
account_id,
action_type,
cost_calculation_lookback_period_in_days,
currency_code,
current_resource_details,
current_resource_type,
estimated_monthly_cost,
estimated_monthly_savings,
estimated_savings_over_cost_calculation_lookback_period,
estimated_savings_percentage,
implementation_effort,
last_refresh_timestamp,
recommendation_id,
recommendation_lookback_period_in_days,
recommended_resource_details,
recommended_resource_type,
region,
resource_arn,
resource_id,
restart_needed,
rollback_possible,
source,
tags
FROM aws.cost_optimization_hub.recommendations
WHERE region = '{{ region }}' -- required
;