Lab complete!
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool
Now that we have created a workload, we will answer the question OPS 5. How do you reduce defects, ease remediation, and improve flow into production. For this question, we will select a subset of the best practices, affirming them as true (turning them from unchecked to checked):
Make sure you have the WorkloadId from the previous step and replace WorkloadId with it
To find the OPS 5 question listed above, we will search through the pillar for any question that begins with the string of the question.
The simplest way to find the QuestionId for a pillar is to search the output from the list-answers API call.
Using the list-answers API, we can search the output for the question we want to answer.
aws wellarchitected list-answers --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --pillar-id "operationalExcellence" --query 'AnswerSummaries[?starts_with(QuestionTitle, `How do you reduce defects, ease remediation, and improve flow into production`) == `true`].QuestionId'
This will return the value of the QuestionId, in this case dev-integ
Next, using the get-answer API we can find the ChoiceId values of each answer. For this first command, we will get the ChoiceId for “Use version control”
aws wellarchitected get-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --query 'Answer.Choices[?starts_with(Title, `Use version control`) == `true`].ChoiceId'
This will return the value of the ChoiceId, in this case ops_dev_integ_version_control
Now we need to get the rest of the ChoiceID’s for each of the best practices we want to select for the question
aws wellarchitected get-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --query 'Answer.Choices[?starts_with(Title, `Use configuration management systems`) == `true`].ChoiceId'
aws wellarchitected get-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --query 'Answer.Choices[?starts_with(Title, `Use build and deployment management systems`) == `true`].ChoiceId'
aws wellarchitected get-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --query 'Answer.Choices[?starts_with(Title, `Perform patch management`) == `true`].ChoiceId'
aws wellarchitected get-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --query 'Answer.Choices[?starts_with(Title, `Use multiple environments`) == `true`].ChoiceId'
This will return the rest of the values we need for ChoiceID:
ops_dev_integ_conf_mgmt_sys
ops_dev_integ_build_mgmt_sys
ops_dev_integ_patch_mgmt
ops_dev_integ_multi_env
aws wellarchitected update-answer --workload-id "<WorkloadId>" --lens-alias "wellarchitected" --question-id "dev-integ" --selected-choices ops_dev_integ_version_control ops_dev_integ_conf_mgmt_sys ops_dev_integ_build_mgmt_sys ops_dev_integ_patch_mgmt ops_dev_integ_multi_env
Now that you have completed this lab, make sure to update your Well-Architected review if you have implemented these changes in your workload.
Click here to access the Well-Architected Tool