Table: aws_wellarchitected_lens_review_improvement - Query AWS Well-Architected Framework Lens Review using SQL
The AWS Well-Architected Framework Lens Review is a tool that helps you analyze and improve your workloads by comparing them against AWS best practices. It uses a set of architectural best practices across five pillars: operational excellence, security, reliability, performance efficiency, and cost optimization. This review provides you with a consistent approach to evaluate architectures and implement designs that can scale over time.
Table Usage Guide
The aws_wellarchitected_lens_review_improvement
table in Steampipe provides you with information about Lens Review Improvements within the AWS Well-Architected Framework. This table allows you, as a DevOps engineer, architect, or developer, to query improvement-specific details, including the improvement status, improvement summary, and associated metadata. You can utilize this table to gather insights on improvements, such as those associated with a specific lens review, their status, and a brief summary of the improvement. The schema outlines the various attributes of the Lens Review Improvement for you, including the workload ID, lens alias, improvement ID, and improvement status.
Important Notes
workload_id
andlens_alias
are optional query parameters for filtering out the review improvements with given workload id or lens alias.- For AWS official lenses, this is either the lens alias, such as serverless, or the lens ARN, such as arn:aws:wellarchitected:us-east-1::lens/serverless. Note that some operations (such as ExportLens and CreateLensShare) are not permitted on AWS official lenses.
- For custom lenses, this is the lens ARN, such as arn:aws:wellarchitected:us-west-2:123456789012:lens/0123456789abcdef01234567890abcdef.
Examples
Basic info
select lens_alias, lens_arn, workload_id, improvement_plan_url, pillar_id, question_id, question_titlefrom aws_wellarchitected_lens_review_improvement;
select lens_alias, lens_arn, workload_id, improvement_plan_url, pillar_id, question_id, question_titlefrom aws_wellarchitected_lens_review_improvement;
List review improvements with risk high for a workload
select lens_alias, lens_arn, workload_id, improvement_plan_url, question_id, question_title, riskfrom aws_wellarchitected_lens_review_improvementwhere workload_id = '4fca39b680a31bb118be6bc0d177849d' and risk = 'HIGH';
select lens_alias, lens_arn, workload_id, improvement_plan_url, question_id, question_title, riskfrom aws_wellarchitected_lens_review_improvementwhere workload_id = '4fca39b680a31bb118be6bc0d177849d' and risk = 'HIGH';
Get review improvement risk counts for a particular workload and lens
select lens_arn, workload_id, risk, count(risk)from aws_wellarchitected_lens_review_improvementwhere lens_alias = 'wellarchitected' and workload_id = '4fca39b680a31bb118be6bc0d177849d'group by risk, lens_arn, workload_id;
select lens_arn, workload_id, risk, count(risk)from aws_wellarchitected_lens_review_improvementwhere lens_alias = 'wellarchitected' and workload_id = '4fca39b680a31bb118be6bc0d177849d'group by risk, lens_arn, workload_id;
Get improvement plan details of the review improvements for each workload
select lens_alias, workload_id, p ->> 'ChoiceId' as choice_id, p ->> 'DisplayText' as display_text, p ->> 'ImprovementPlanUrl' as improvement_plan_urlfrom aws_wellarchitected_lens_review_improvement, jsonb_array_elements(improvement_plans) as p;
select lens_alias, workload_id, json_extract(p.value, '$.ChoiceId') as choice_id, json_extract(p.value, '$.DisplayText') as display_text, json_extract(p.value, '$.ImprovementPlanUrl') as improvement_plan_urlfrom aws_wellarchitected_lens_review_improvement, json_each(improvement_plans) as p;
Schema for aws_wellarchitected_lens_review_improvement
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
improvement_plan_url | text | The improvement plan URL for a question. This value is only available if the question has been answered. | |
improvement_plans | jsonb | The improvement plan details. | |
lens_alias | text | = | The alias of the lens. For Amazon Web Services official lenses, this is either the lens alias, such as serverless, or the lens ARN, such as arn:aws:wellarchitected:us-east-1:123456789012:lens/my-lens. Each lens is identified by its LensSummary$LensAlias. |
lens_arn | text | The ARN for the lens. | |
milestone_number | bigint | = | The milestone number. A workload can have a maximum of 100 milestones. |
partition | text | The AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov). | |
pillar_id | text | = | The ID used to identify a pillar, for example, security. A pillar is identified by its PillarReviewSummary$PillarId. |
question_id | text | The ID of the question. | |
question_title | text | The title of the question. | |
region | text | The AWS Region in which the resource is located. | |
risk | text | The risk for a given workload, lens review, pillar, or question. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
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_improvement