Table: aws_wellarchitected_lens_review - Query AWS Well-Architected Tool Lens Reviews using SQL
The AWS Well-Architected Tool Lens Review is a feature of the AWS Well-Architected Tool. It allows you to review your workloads against the best practices defined in AWS Well-Architected Framework and improve your cloud architectures. It uses SQL queries to provide insights into the performance, cost efficiency, operational excellence, reliability, and security of your workloads.
Table Usage Guide
The aws_wellarchitected_lens_review
table in Steampipe provides you with information about lens reviews within the AWS Well-Architected Tool. This table allows you, as a DevOps engineer, to query review-specific details, including the associated workload, lens, and milestone information. You can utilize this table to gather insights on lens reviews, such as the risk level of each review, the number of high-risk issues, and the number of improvement plans. The schema outlines the various attributes of the lens review for you, including the workload ID, lens alias, milestone number, and other associated metadata.
Examples
Basic info
Explore the details of your AWS Well-Architected Lens reviews to gain insights into the different lenses you have applied and their respective updates. This can help you manage and optimize your workloads effectively.
select lens_name, workload_id, lens_arn, lens_alias, lens_version, updated_atfrom aws_wellarchitected_lens_review;
select lens_name, workload_id, lens_arn, lens_alias, lens_version, updated_atfrom aws_wellarchitected_lens_review;
List reviews of deprecated lenses
Discover the segments that include reviews of outdated lenses in the AWS Well-Architected tool, which can be useful to identify areas for potential updates or replacements.
select lens_name, workload_id, lens_alias, lens_statusfrom aws_wellarchitected_lens_reviewwhere lens_status = 'DEPRECATED';
select lens_name, workload_id, lens_alias, lens_statusfrom aws_wellarchitected_lens_reviewwhere lens_status = 'DEPRECATED';
Get high-risk issue counts for each review
Determine the areas in which high-risk issues are prevalent within each review, in order to prioritize risk mitigation efforts.
select lens_name, workload_id, risk_counts -> 'HIGH' as high_risk_countsfrom aws_wellarchitected_lens_review;
select lens_name, workload_id, json_extract(risk_counts, '$.HIGH') as high_risk_countsfrom aws_wellarchitected_lens_review;
Get workload details of each lens review
Explore the status and version of each lens review in your AWS environment, along with its associated workload details. This helps in assessing the architectural design and environment of the workload, and in identifying any review restrictions.
select r.lens_name, r.workload_id, r.lens_status, r.lens_version, w.architectural_design, w.environment, w.review_restriction_datefrom aws_wellarchitected_lens_review as r, aws_wellarchitected_workload as wwhere r.workload_id = w.workload_id;
select r.lens_name, r.workload_id, r.lens_status, r.lens_version, w.architectural_design, w.environment, w.review_restriction_datefrom aws_wellarchitected_lens_review as r join aws_wellarchitected_workload as w on r.workload_id = w.workload_id;
Get the pillar review summary of lens reviews
Explore the summary of lens reviews in the AWS Well-Architected Tool to gain insights into the assessment of architectural decisions. This query is useful in identifying areas of risk and improvement within your AWS environment.
select lens_name, lens_arn, s ->> 'Notes' as pillar_review_summary_note, s ->> 'PillarId' as pillar_id, s ->> 'PillarName' as pillar_name, s ->> 'RiskCounts' as RiskCountsfrom aws_wellarchitected_lens_review, jsonb_array_elements(pillar_review_summaries) as s;
select lens_name, lens_arn, json_extract(s.value, '$.Notes') as pillar_review_summary_note, json_extract(s.value, '$.PillarId') as pillar_id, json_extract(s.value, '$.PillarName') as pillar_name, json_extract(s.value, '$.RiskCounts') as RiskCountsfrom aws_wellarchitected_lens_review, json_each(pillar_review_summaries) as s;
Get risk count details of the lens review
Discover the segments that have potential risks within your AWS Well-Architected Lens Review. This is useful for identifying areas that need improvement to ensure your architecture is well-optimized and secure.
select lens_name, lens_arn, jsonb_pretty(risk_counts) as risk_countsfrom aws_wellarchitected_lens_review;
select lens_name, lens_arn, json_pretty(risk_counts) as risk_countsfrom aws_wellarchitected_lens_review;
Query examples
- wellarchitected_workload_answered_question_count
- wellarchitected_workload_high_risk_count
- wellarchitected_workload_lens_risk_table
- wellarchitected_workload_medium_risk_count
- wellarchitected_workload_milestone_lens_review_risk_counts
- wellarchitected_workload_milestone_risk_table
- wellarchitected_workload_milestone_unanswered_table
- wellarchitected_workload_no_improvements_risk_count
- wellarchitected_workload_not_applicable_risk_count
- wellarchitected_workload_pillar_risk_table
- wellarchitected_workload_risks_by_lens
- wellarchitected_workload_risks_by_milestone
- wellarchitected_workload_risks_by_pillar
- wellarchitected_workload_unanswered_by_milestone
Schema for aws_wellarchitected_lens_review
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
lens_alias | text | = | The alias of the lens. |
lens_arn | text | The ARN for the lens. | |
lens_name | text | The full name of the lens. | |
lens_status | text | The status of the lens. | |
lens_version | text | The version of the lens. | |
milestone_number | bigint | = | The milestone number. A workload can have a maximum of 100 milestones. |
notes | text | The notes associated with the workload. | |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
pillar_review_summaries | jsonb | A map from risk names to the count of how questions have that rating. | |
region | text | The AWS Region in which the resource is located. | |
risk_counts | jsonb | A map from risk names to the count of how questions have that rating. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | The date and time of the last update. | |
workload_id | text | = | The ID assigned to the workload. |
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_wellarchitected_lens_review