Table: aws_wellarchitected_answer - Query AWS Well-Architected Tool Answer using SQL
The AWS Well-Architected Tool Answer is a feature within the AWS Well-Architected Tool service. It allows you to review your workloads against AWS architectural best practices, and provides guidance on improving your cloud architectures. The tool helps you understand the pros and cons of decisions you make while building workloads, and provides AWS best practices for creating high-performing, resilient, and efficient infrastructure for your applications.
Table Usage Guide
The aws_wellarchitected_answer
table in Steampipe provides you with information about the answers within AWS Well-Architected Tool. This table allows you, as a DevOps engineer, to query answer-specific details, including the workload, lens, and question associated with each answer. You can utilize this table to gather insights on answers, such as the workload and lens associated with a specific answer, the question that the answer corresponds to, and more. The schema outlines the various attributes of the Well-Architected Tool answer for you, including the answer ID, workload ID, lens alias, and associated metadata.
Important Notes
- For improved performance, it is advisable that you use the optional qual
workload_id
,pillar_id
, andlens_alias
to limit the result set to a specific workload, pillar, or lens.
Examples
Basic info
Explore the risk factors and reasons associated with different workloads in various regions using the AWS Well-Architected Framework. This can help identify potential issues and areas for improvement in your cloud architecture.
select a.question_id, a.lens_alias, a.workload_id, a.is_applicable, a.pillar_id, a.question_title, a.risk, a.reason, a.regionfrom aws_wellarchitected_answer a;
select a.question_id, a.lens_alias, a.workload_id, a.is_applicable, a.pillar_id, a.question_title, a.risk, a.reason, a.regionfrom aws_wellarchitected_answer a;
Get the number of questions per pillar
Determine the areas in which you can assess the number of questions associated with each pillar for a specific workload in AWS Well-Architected framework. This is beneficial for understanding the distribution of questions across different pillars, aiding in workload management and strategic planning.
select a.workload_id, a.pillar_id, count(a.question_id) as total_questionsfrom aws_wellarchitected_answer agroup by a.workload_id, a.pillar_id;
select a.workload_id, a.pillar_id, count(a.question_id) as total_questionsfrom aws_wellarchitected_answer agroup by a.workload_id, a.pillar_id;
List all the questions along with the choices
Explore the various questions and associated choices within your AWS Well-Architected framework. This is useful for understanding the different options available for each question, helping to make informed decisions about your AWS architecture.
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, c ->> 'Title' as choice_title, c ->> 'ChoiceId' as choice_id, c ->> 'Description' as choice_description, c ->> 'HelpfulResource' as choice_helpful_resource, c ->> 'ImprovementPlan' as choice_improvement_planfrom aws_wellarchitected_answer a, jsonb_array_elements(choices) c;
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, json_extract(c.value, '$.Title') as choice_title, json_extract(c.value, '$.ChoiceId') as choice_id, json_extract(c.value, '$.Description') as choice_description, json_extract(c.value, '$.HelpfulResource') as choice_helpful_resource, json_extract(c.value, '$.ImprovementPlan') as choice_improvement_planfrom aws_wellarchitected_answer a, json_each(a.choices) c;
List all the questions along with the answered choices
Determine the areas in which specific questions have been answered within a workload on AWS. This can help in understanding the reasons behind certain choices, their status, and associated notes, thereby providing a comprehensive view of decision-making processes.
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, c ->> 'Notes' as choice_notes, c ->> 'Reason' as choice_reason, c ->> 'Status' as choice_status, c ->> 'ChoiceId' as choice_idfrom aws_wellarchitected_answer a, jsonb_array_elements(choice_answers) c;
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, json_extract(c.value, '$.Notes') as choice_notes, json_extract(c.value, '$.Reason') as choice_reason, json_extract(c.value, '$.Status') as choice_status, json_extract(c.value, '$.ChoiceId') as choice_idfrom aws_wellarchitected_answer a, json_each(a.choice_answers) as c;
List questions that are not applicable for a workload
Determine the areas in which certain questions are not relevant for a specific workload in AWS Well-Architected Tool. This can help in focusing on applicable areas and streamlining the review process.
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, reasonfrom aws_wellarchitected_answer awhere not is_applicable;
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.question_description, reasonfrom aws_wellarchitected_answer awhere is_applicable = 0;
List questions that are marked as high or medium risk
Determine areas of concern by identifying questions marked as high or medium risk. This is useful for prioritizing areas for improvement and mitigating potential issues.
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.risk, c ->> 'ChoiceId' as choice_id, c ->> 'Status' as choice_status, c ->> 'Reason' as choice_reason, c ->> 'Notes' as choice_notesfrom aws_wellarchitected_answer a, jsonb_array_elements(choice_answers) cwhere risk = 'HIGH' or risk = 'MEDIUM';
select a.question_id, a.lens_alias, a.workload_id, a.question_title, a.risk, json_extract(c.value, '$.ChoiceId') as choice_id, json_extract(c.value, '$.Status') as choice_status, json_extract(c.value, '$.Reason') as choice_reason, json_extract(c.value, '$.Notes') as choice_notesfrom aws_wellarchitected_answer a, json_each(a.choice_answers) as cwhere a.risk = 'HIGH' or a.risk = 'MEDIUM';
Get count of questions in each risk factor for each workload
Assess the elements within each workload to identify the total number of high and medium risk questions. This provides insights into potential areas of concern that may require further attention or mitigation.
select workload_id, risk, count(question_id) as total_questionsfrom aws_wellarchitected_answerwhere risk = 'HIGH' or risk = 'MEDIUM'group by workload_id, risk;
select workload_id, risk, count(question_id) as total_questionsfrom aws_wellarchitected_answerwhere risk = 'HIGH' or risk = 'MEDIUM'group by workload_id, risk;
Schema for aws_wellarchitected_answer
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The AWS Account ID in which the resource is located. |
choice_answers | jsonb | A list of selected choices to a question in your workload. | |
choices | jsonb | List of choices available for a question. | |
helpful_resource_display_text | text | The helpful resource text to be displayed. | |
helpful_resource_url | text | The helpful resource URL for a question. | |
improvement_plan_url | text | The improvement plan URL for a question. This value is only available if the question has been answered. | |
is_applicable | boolean | Defines whether this question is applicable to a lens review. | |
lens_alias | text | = | The alias of the lens. |
lens_arn | text | The Amazon Resource Name (ARN) of the lens. | |
milestone_number | bigint | = | The milestone number. |
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_id | text | = | The ID used to identify a pillar, for example, security. A pillar is identified by its PillarReviewSummary$PillarId. |
question_description | text | The description of the question. | |
question_id | text | = | The ID of the question. |
question_title | text | The title of the question. | |
reason | text | The reason why the question is not applicable to your workload. | |
region | text | The AWS Region in which the resource is located. | |
risk | text | The risk for a given workload, lens review, pillar, or question. | |
selected_choices | jsonb | List of selected choice IDs in a question answer. The values entered replace the previously selected choices. | |
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_answer