steampipe plugin install aws

Table: aws_rds_db_recommendation - Query AWS RDS DB Recommendations using SQL

The AWS RDS DB Recommendation table provides insights and suggestions for improving the configuration and performance of your RDS DB instances and clusters. This table allows you, as a DevOps engineer, to query specific recommendations, understand their impact, and take appropriate actions to optimize your database setup.

Table Usage Guide

The aws_rds_db_recommendation table in Steampipe offers detailed information about recommendations generated by AWS for your RDS DB instances and clusters. You can query this table to gather insights on issues, suggested improvements, and the status of each recommendation. The schema includes various attributes such as recommendation ID, description, severity, creation and update times, and links to further documentation.

Examples

List all recommendations with high severity

Identify all recommendations with a high severity level to prioritize actions that address the most critical issues in your RDS setup.

select
recommendation_id,
title,
severity,
description,
created_time
from
aws_rds_db_recommendation
where
severity = 'high';
select
recommendation_id,
title,
severity,
description,
created_time
from
aws_rds_db_recommendation
where
severity = 'high';

List all recommendations created in the last 30 days

Find recommendations that were created recently to stay updated on new issues and suggested improvements.

select
recommendation_id,
title,
created_time,
description
from
aws_rds_db_recommendation
where
created_time >= now() - interval '30 days';
select
recommendation_id,
title,
created_time,
description
from
aws_rds_db_recommendation
where
created_time >= datetime('now', '-30 days');

Get details of recommendations along with the actions suggested by AWS to resolve the identified issues.

select
recommendation_id,
title,
recommendation,
recommended_actions
from
aws_rds_db_recommendation;
select
recommendation_id,
title,
recommendation,
recommended_actions
from
aws_rds_db_recommendation;

List recommendations by the order of impact

Understand the potential impact of each recommendation to prioritize actions based on the severity of the issues.

select
recommendation_id,
title,
impact,
description
from
aws_rds_db_recommendation
order by
impact desc;
select
recommendation_id,
title,
impact,
description
from
aws_rds_db_recommendation
order by
impact desc;

List recommendations with unresolved status

Identify recommendations that are still unresolved to track pending issues that need attention.

select
recommendation_id,
title,
status,
updated_time
from
aws_rds_db_recommendation
where
status != 'resolved';
select
recommendation_id,
title,
status,
updated_time
from
aws_rds_db_recommendation
where
status != 'resolved';

Get the issue details that triggered the recommendation

Analyze performance issues for the recommendation.

select
recommendation_id,
issue_details -> 'PerformanceIssueDetails' ->> 'Analysis' as analysis,
issue_details -> 'PerformanceIssueDetails' ->> 'EndTime' as end_time,
issue_details -> 'PerformanceIssueDetails' ->> 'StartTime' as start_time,
issue_details -> 'PerformanceIssueDetails' -> 'Metrics' as metrics
from
aws_rds_db_recommendation
where
issue_details is not null;
select
recommendation_id,
json_extract(
issue_details,
'$.PerformanceIssueDetails.Analysis'
) as analysis,
json_extract(
issue_details,
'$.PerformanceIssueDetails.EndTime'
) as end_time,
json_extract(
issue_details,
'$.PerformanceIssueDetails.StartTime'
) as start_time,
json_extract(
issue_details,
'$.PerformanceIssueDetails.Metrics'
) as metrics
from
aws_rds_db_recommendation
where
issue_details is not null;

View all relevant information clearly and organized, facilitating better planning and decision-making for database maintenance and optimization.

select
recommendation_id,
action ->> 'Title' as title,
action ->> 'Status' as status,
action ->> 'ActionId' as action_id,
action ->> 'Operation' as operation,
action -> 'ApplyModes' as apply_modes,
action -> 'Parameters' as parameters,
action ->> 'Description' as description,
action ->> 'IssueDetails' as issue_details,
action -> 'ContextAttributes' as context_attributes
from
aws_rds_db_recommendation,
jsonb_array_elements(recommended_actions) as action;
select
recommendation_id,
json_extract(action.value, '$.Title') as title,
json_extract(action.value, '$.Status') as status,
json_extract(action.value, '$.ActionId') as action_id,
json_extract(action.value, '$.Operation') as operation,
json_extract(action.value, '$.ApplyModes') as apply_modes,
json_extract(action.value, '$.Parameters') as parameters,
json_extract(action.value, '$.Description') as description,
json_extract(action.value, '$.IssueDetails') as issue_details,
json_extract(action.value, '$.ContextAttributes') as context_attributes
from
aws_rds_db_recommendation,
json_each(recommended_actions) as action;

Schema for aws_rds_db_recommendation

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
additional_infotextAdditional information about the recommendation.
categorytextThe category of the recommendation.
created_timetimestamp with time zoneThe time when the recommendation was created.
descriptiontextA detailed description of the recommendation.
detectiontextA short description of the issue identified for this recommendation.
impacttextA short description that explains the possible impact of an issue.
issue_detailsjsonbDetails of the issue that caused the recommendation.
linksjsonbA link to documentation that provides additional information about the recommendation.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
reasontextThe reason why this recommendation was created.
recommendationtextA short description of the recommendation to resolve an issue.
recommendation_idtext=The unique identifier for the recommendation.
recommended_actionsjsonbA list of recommended actions.
regiontextThe AWS Region in which the resource is located.
resource_arntextThe Amazon Resource Name (ARN) of the RDS resource associated with the recommendation.
severitytext=The severity level of the recommendation.
sourcetextThe AWS service that generated the recommendations.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statustext=The current status of the recommendation.
titletextTitle of the resource.
type_detectiontextA short description of the recommendation type.
type_idtext=A value that indicates the type of recommendation.
type_recommendationtextA short description that summarizes the recommendation to fix all the issues of the recommendation type.
updated_timetimestamp with time zone>=, <=The time when the recommendation was last updated.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- aws

You can pass the configuration to the command with the --config argument:

steampipe_export_aws --config '<your_config>' aws_rds_db_recommendation