Sub topic 13
Using the AWS Well-Architected Tool
This chapter assumes you know the six pillars, that the framework asks questions and records risk levels, and that you have basic AWS CLI access. It shows how to run a review in the AWS Well-Architected Tool, which is a free AWS service for recording a workload, answering the framework's questions, and tracking risks over time.
The working model
The tool stores four things:
- A workload is the system you review, such as an API and the resources behind it.
- A lens is the question set used for the review. The default is the Well-Architected Framework lens.
- An answer records which best practices you follow for each question. The tool derives a risk level from your choices.
- A milestone is a saved snapshot of the answers and risk counts at one point in time.
Step 1: Define the workload
Create the workload in the tool. The environment value tells the tool whether this is production or pre-production, and the Regions field records where the workload runs.
aws wellarchitected create-workload \
--workload-name "orders-api" \
--description "Customer order processing API" \
--environment PRODUCTION \
--lenses wellarchitected \
--aws-regions us-east-1 \
--review-owner "[email protected]"The command returns a WorkloadId. Keep it, because every later command needs it.
Step 2: Answer the questions
List the questions for one pillar and see which are unanswered or flagged.
aws wellarchitected list-answers \
--workload-id <workload-id> \
--lens-alias wellarchitected \
--pillar-id securityEach answer shows its question, its choices, and a risk of UNANSWERED, NONE, MEDIUM, or HIGH. In the console you select the best practices you already follow. The tool computes the risk from those selections. If a question does not apply, you can mark it "not applicable" and add a note explaining why.
Take the Security pillar as an example. One best practice is protecting data in transit. If your S3 buckets accept plain HTTP requests, you would leave that choice unchecked. The bucket policy below fixes the gap by denying any request that does not use TLS.
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyInsecureTransport",
"Effect": "Deny",
"Principal": "*",
"Action": "s3:*",
"Resource": [
"arn:aws:s3:::example-bucket",
"arn:aws:s3:::example-bucket/*"
],
"Condition": {
"Bool": { "aws:SecureTransport": "false" }
}
}
]
}After you apply the fix, go back and update the answer so the recorded risk matches reality.
Step 3: Save a milestone
Once you have answered the questions, save a milestone. Do this again after each round of fixes.
aws wellarchitected create-milestone \
--workload-id <workload-id> \
--milestone-name "After first remediation sprint"Milestones are read-only. You can compare them to show how high and medium risk counts fall over time.
Common errors
- Answering optimistically. Selecting a best practice you only partly follow hides a real risk. Answer for what is true today.
- Forgetting to update answers. If you fix a problem but leave the answer alone, the risk count stays high and progress is invisible.
- Skipping the notes. Notes explain why you chose an answer. They help the next reviewer.
- Saving only one milestone. A single snapshot cannot show progress. Save one before and one after each remediation round.
- Reviewing alone. Include people who operate the workload. They know details that the architect may not.
Exercises
Exercise
You fixed three high risk items in your workload but the tool still shows them as high risk. What did you forget to do, and what should you do next?
Show answer
You did not update the answers. Edit the answers for those questions to select the best practices you now follow, then save a milestone so the change is recorded.
Exercise
Which command lists the questions and risk levels for the Reliability pillar of a workload?
Show answer
aws wellarchitected list-answers --workload-id <workload-id> --lens-alias wellarchitected --pillar-id reliability