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_timefrom aws_rds_db_recommendationwhere severity = 'high';
select recommendation_id, title, severity, description, created_timefrom aws_rds_db_recommendationwhere 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, descriptionfrom aws_rds_db_recommendationwhere created_time >= now() - interval '30 days';
select recommendation_id, title, created_time, descriptionfrom aws_rds_db_recommendationwhere created_time >= datetime('now', '-30 days');
List recommendations with their recommended actions
Get details of recommendations along with the actions suggested by AWS to resolve the identified issues.
select recommendation_id, title, recommendation, recommended_actionsfrom aws_rds_db_recommendation;
select recommendation_id, title, recommendation, recommended_actionsfrom 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, descriptionfrom aws_rds_db_recommendationorder by impact desc;
select recommendation_id, title, impact, descriptionfrom aws_rds_db_recommendationorder 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_timefrom aws_rds_db_recommendationwhere status != 'resolved';
select recommendation_id, title, status, updated_timefrom aws_rds_db_recommendationwhere 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 metricsfrom aws_rds_db_recommendationwhere 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 metricsfrom aws_rds_db_recommendationwhere issue_details is not null;
List the recommended action details for a particular recommendation
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_attributesfrom 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_attributesfrom aws_rds_db_recommendation, json_each(recommended_actions) as action;
Schema for aws_rds_db_recommendation
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
additional_info | text | Additional information about the recommendation. | |
category | text | The category of the recommendation. | |
created_time | timestamp with time zone | The time when the recommendation was created. | |
description | text | A detailed description of the recommendation. | |
detection | text | A short description of the issue identified for this recommendation. | |
impact | text | A short description that explains the possible impact of an issue. | |
issue_details | jsonb | Details of the issue that caused the recommendation. | |
links | jsonb | A link to documentation that provides additional information about the recommendation. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
reason | text | The reason why this recommendation was created. | |
recommendation | text | A short description of the recommendation to resolve an issue. | |
recommendation_id | text | = | The unique identifier for the recommendation. |
recommended_actions | jsonb | A list of recommended actions. | |
region | text | The AWS Region in which the resource is located. | |
resource_arn | text | The Amazon Resource Name (ARN) of the RDS resource associated with the recommendation. | |
severity | text | = | The severity level of the recommendation. |
source | text | The AWS service that generated the recommendations. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
status | text | = | The current status of the recommendation. |
title | text | Title of the resource. | |
type_detection | text | A short description of the recommendation type. | |
type_id | text | = | A value that indicates the type of recommendation. |
type_recommendation | text | A short description that summarizes the recommendation to fix all the issues of the recommendation type. | |
updated_time | timestamp 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