steampipe plugin install aws

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 and lens_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_title
from
aws_wellarchitected_lens_review_improvement;
select
lens_alias,
lens_arn,
workload_id,
improvement_plan_url,
pillar_id,
question_id,
question_title
from
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,
risk
from
aws_wellarchitected_lens_review_improvement
where
workload_id = '4fca39b680a31bb118be6bc0d177849d'
and risk = 'HIGH';
select
lens_alias,
lens_arn,
workload_id,
improvement_plan_url,
question_id,
question_title,
risk
from
aws_wellarchitected_lens_review_improvement
where
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_improvement
where
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_improvement
where
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_url
from
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_url
from
aws_wellarchitected_lens_review_improvement,
json_each(improvement_plans) as p;

Schema for aws_wellarchitected_lens_review_improvement

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The AWS Account ID in which the resource is located.
improvement_plan_urltextThe improvement plan URL for a question. This value is only available if the question has been answered.
improvement_plansjsonbThe improvement plan details.
lens_aliastext=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_arntextThe ARN for the lens.
milestone_numberbigint=The milestone number. A workload can have a maximum of 100 milestones.
partitiontextThe AWS partition in which the resource is located (aws, aws-cn, or aws-us-gov).
pillar_idtext=The ID used to identify a pillar, for example, security. A pillar is identified by its PillarReviewSummary$PillarId.
question_idtextThe ID of the question.
question_titletextThe title of the question.
regiontextThe AWS Region in which the resource is located.
risktextThe risk for a given workload, lens review, pillar, or question.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
workload_idtext=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