Skip to content

aws.compute_optimizer.get_ec2_recommendation_projected_metrics

Example SQL Queries

SELECT * FROM
aws.compute_optimizer.get_ec2_recommendation_projected_metrics
WHERE
"instance_arn" = 'VALUE'
AND "stat" = 'VALUE'
AND "period" = 'VALUE'
AND "start_time" = 'VALUE'
AND "end_time" = 'VALUE';

Description

Returns the projected utilization metrics of Amazon EC2 instance recommendations.

The Cpu and Memory metrics are the only projected utilization metrics returned when you run this action. Additionally, the Memory metric is returned only for resources that have the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.

Table Definition

Column NameColumn Data Type
end_time Required Input Column

The timestamp of the last projected metrics data point to return.

TIMESTAMP_S
instance_arn Required Input Column

The Amazon Resource Name (ARN) of the instances for which to return recommendation projected metrics.

VARCHAR
period Required Input Column

The granularity, in seconds, of the projected metrics data points.

BIGINT
start_time Required Input Column

The timestamp of the first projected metrics data point to return.

TIMESTAMP_S
stat Required Input Column

The statistic of the projected metrics.

VARCHAR
recommendation_preferences Input Column

An object to specify the preferences for the Amazon EC2 recommendation projected metrics to return in the response.

STRUCT(
"cpu_vendor_architectures" VARCHAR[]
)
Show child fields
recommendation_preferences.cpu_vendor_architectures[]
_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
recommended_option_projected_metrics

An array of objects that describes projected metrics.

STRUCT(
"recommended_instance_type" VARCHAR,
"rank" BIGINT,
"projected_metrics" STRUCT(
"name" VARCHAR,
"timestamps" TIMESTAMP_S[],
"values" DOUBLE[]
)[]
)[]
Show child fields
recommended_option_projected_metrics[]
Show child fields
recommended_option_projected_metrics[].projected_metrics[]
Show child fields
recommended_option_projected_metrics[].projected_metrics[].name

The name of the projected utilization metric.

The following projected utilization metrics are returned:

  • Cpu - The projected percentage of allocated EC2 compute units that would be in use on the recommendation option had you used that resource during the analyzed period. This metric identifies the processing power required to run an application on the recommendation option.

    Depending on the instance type, tools in your operating system can show a lower percentage than CloudWatch when the instance is not allocated a full processor core.

  • Memory - The percentage of memory that would be in use on the recommendation option had you used that resource during the analyzed period. This metric identifies the amount of memory required to run an application on the recommendation option.

    Units: Percent

    The Memory metric is only returned for resources with the unified CloudWatch agent installed on them. For more information, see Enabling Memory Utilization with the CloudWatch Agent.

  • GPU - The projected percentage of allocated GPUs if you adjust your configurations to Compute Optimizer's recommendation option.

  • GPU_MEMORY - The projected percentage of total GPU memory if you adjust your configurations to Compute Optimizer's recommendation option.

    The GPU and GPU_MEMORY metrics are only returned for resources with the unified CloudWatch Agent installed on them. For more information, see Enabling NVIDIA GPU utilization with the CloudWatch Agent.

recommended_option_projected_metrics[].projected_metrics[].timestamps[]
recommended_option_projected_metrics[].projected_metrics[].values[]
recommended_option_projected_metrics[].rank

The rank of the recommendation option projected metric.

The top recommendation option is ranked as 1.

The projected metric rank correlates to the recommendation option rank. For example, the projected metric ranked as 1 is related to the recommendation option that is also ranked as 1 in the same response.

recommended_option_projected_metrics[].recommended_instance_type

The recommended instance type.