

# Understanding resiliency scores
<a name="resil-score"></a>

This section describes how AWS Resilience Hub quantifies application readiness from different disruption scenarios. 

AWS Resilience Hub provides resiliency score that represents the resiliency posture of the application. This score reflects how closely the application follows our recommendations for meeting the application's resiliency policy, alarms, standard operating procedures (SOPs), and tests. Based on the type of resources the application uses, AWS Resilience Hub recommends alarms, SOPs, and a set of tests for each disruption type.

The top resiliency score is 100 points. To achieve the best possible score or the top score, you must implement all the recommended alarms, SOPs, and tests in your application. For example, AWS Resilience Hub recommends one test with one alarm and one SOP. The test runs and fires the alarm and initiates the associated SOP. If they perform successfully and if the application meets the resiliency policy, it receives a resiliency score close to or equal to 100 points.

After running first assessment, AWS Resilience Hub provides an option to exclude operational recommendations from your application. To understand the impact of the excluded recommendations on the resiliency score, you must run a new assessment. However, you can always include the excluded recommendations in your application and run a new assessment. For more information about including and excluding alarm, SOP, and test recommendations, see [Including or excluding operational recommendations](exclude-recommend.md).

# Accessing the Resiliency score of your applications
<a name="access-score"></a>

You can view the Resiliency score of your application by choosing **Dashboard** or **Applications** from the navigation menu.

**Accessing the Resiliency score from Dashboard**

1. In the left navigation menu, choose **Dashboard**.

1. In **Application resiliency score over time**, choose one or more applications in the **Choose up to 4 applications** dropdown list.

1. The **Resiliency score** chart displays the resiliency score for all the chosen applications.

**Accessing the Resiliency score from Applications**

1. In the left navigation menu, choose **Applications**.

1. In **Applications**, open an application.

1. Choose **Summary**. 

   The **Resiliency score** chart displays the trend of your application's resiliency score for up to one year. AWS Resilience Hub displays action items, resiliency policy breaches, and operational recommendations that need to be addressed for improving and achieving the maximum possible resiliency score using the following:
   + To view the action items that need to be completed for improving and achieving the maximum possible resiliency score, choose **Action items** tab. When selected, AWS Resilience Hub displays the following:
     + **RTO/RPO** – Indicates the number of recovery times (RTO/RPOs) that need to be fixed to resolve the breaches in your application's resiliency policy. Choose the value to view the RTO/RPO details in the assessment report of your application.
     + **Alarms** – Indicates the number of recommended Amazon CloudWatch alarms that need to be implemented in your application. Choose the value to view the Amazon CloudWatch alarms that need to be fixed in the assessment report of your application.
     + **SOPs** – Indicates the number of recommended SOPs that need to be implemented in your application. Choose the value to view the SOPs that need to be fixed in the assessment report of your application.
     + **FIS ** – Indicates the number of recommended tests that need to be implemented in your application. Choose the value to view the tests that need to be fixed in the assessment report of your application.
   + To view the score of each component that affects your resiliency score, choose **Score breakdown**. When selected, AWS Resilience Hub displays the following:
     + **RTO/RPO compliance** – Indicates how compliant the Applications Components (AppComponents) are with the estimated workload recovery times, and the target recovery times that are defined in your application’s resiliency policy. Choose the value to view the RTO/RPO estimations in the assessment report of your application.
     + **Alarms implemented** – Indicates the actual contribution of the implemented Amazon CloudWatch alarms compared to its maximum possible contribution towards the resiliency score of your application. Choose the value to view the implemented Amazon CloudWatch alarms in the assessment report of your application.
     + **SOPs implemented** – Indicates the actual contribution of the implemented SOPs compared to its maximum possible contribution towards the resiliency score of your application. Choose the value to view the implemented SOPs in the assessment report of your application.
     + **FIS experiments implemented** – Indicates the actual contribution of the implemented tests compared to its maximum possible contribution towards the resiliency score of your application. Choose the value to view the implemented tests in the assessment report of your application.
   + To view the resiliency policy breaches and operational recommendations, choose the right arrow to expand the **Policy breach and operational recommendations breakdown** section. When expanded, AWS Resilience Hub displays the following:
     + **Resiliency policy breaches** – Indicates the number of Application Components that breaches your application's resiliency policy. Choose the value next to **RTO/RPO** to view the details in the **Resiliency recommendations** tab of your application's assessment report.
     + **Operational recommendations** – Indicates the operational recommendations that have not been implemented or executed to enhance the resiliency of your application using **Outstanding** and **Excluded** tabs. Operational recommendations include all the recommendations that are inactive and the ones that have not been implemented.

       To view the operational recommendations that need to be implemented, choose **Outstanding** tab. When selected, AWS Resilience Hub displays the following:
       + **Alarms** – Indicates the number of recommended Amazon CloudWatch alarms that need to be implemented.
       + **SOPs** – Indicates the number of recommended SOPs that need to be implemented.
       + **FIS** – Indicates the number of recommended tests that need to be implemented.

       To view the operational recommendations that are excluded from your application, choose **Excluded** tab. When selected AWS Resilience Hub displays the following:
       + **Alarms** – Indicates the number of recommended Amazon CloudWatch alarms that are excluded from your application.
       + **SOPs** – Indicates the number of recommended SOPs that are excluded from your application.
       + **FIS** – Indicates the number of recommended tests that are excluded from your application.

# Calculating resiliency scores
<a name="calculate-score"></a>

The tables in this section explains the formulas used by AWS Resilience Hub to determine the scoring components of each recommendation type and the resiliency score of your application. All the resultant values determined by AWS Resilience Hub for scoring components of each recommendation type and the resiliency score of your application are rounded to their nearest point. For example, if two out of three alarms were implemented, the score would be 13.33 ((2/3) \$1 20) points. This value will be rounded to 13 points. For more information about weights used in the formulas within the tables, see [Weights](#weight) section.

Some of the scoring components can be obtained only through the `ScoringComponentResiliencyScore` API. For more information about this API, see [ScoringComponentResiliencyScore](https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_ScoringComponentResiliencyScore.html).

**Tables**
+ [**Formulas to calculate the scoring component of each recommendation type**](#recommendation-type-coverage)
+ [**Formula to calculate the resiliency score**](#resiliency-score)
+ [**Formulas to calculate resiliency score for AppComponents and disruption types**](#resiliency-score-AppComponents-disruption-types)

The following table explains the formulas used by AWS Resilience Hub to calculate the scoring component of each recommendation type.


**Formulas to calculate the scoring component of each recommendation type**  

| Scoring component | Description | Formula | Example | 
| --- | --- | --- | --- | 
| Test coverage (T) | A normalized score (0 -100 points) based on the number of tests that were successfully implemented and excluded, out of the total number of AWS Resilience Hub recommended tests. To calculate the resiliency score, the recommended tests must have run successfully in the last 30 days for AWS Resilience Hub to consider it as implemented.  | T = ((Total number of tests implemented) \$1 (Total number of tests excluded)) / (Total number of tests recommended)Parts of the formula are as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html) | If you have implemented 10 and excluded 5 tests out of 20 AWS Resilience Hub recommended tests, the test coverage is calculated as follows:`T = (10 + 5) / 20`That is, `T = .75 or 75 points` | 
| Alarms coverage (A) | A normalized score (0 -100 points) based on the number of Amazon CloudWatch alarms that were successfully implemented and excluded, out of the total number of AWS Resilience Hub recommended Amazon CloudWatch alarms. To calculate the resiliency score, the recommended alarms should be in **Ready** state for AWS Resilience Hub to consider it as implemented.  | A = ((Total number of alarms implemented) \$1 (Total number of alarms excluded)) / (Total number of alarms recommended)Parts of the formula are as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html) | If you have implemented 10 and excluded 5 Amazon CloudWatch alarms out of 20 AWS Resilience Hub recommended Amazon CloudWatch alarms, the Amazon CloudWatch alarms coverage is calculated as follows:`A = (10 + 5) / 20`That is, `A = .75 or 75 points` | 
| SOP coverage (S) | A normalized score (0 -100 points) based on the number of SOPs that were successfully implemented and excluded, out of the total number of AWS Resilience Hub recommended SOPs. | S = ((Total number of SOPs implemented) \$1 (Total number of SOPs excluded)) / (Total number of SOPs recommended)Parts of the formula are as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html) | If you have implemented 10 and excluded 5 SOPs out of 20 AWS Resilience Hub recommended SOPs, the SOP coverage is calculated as follows:`S = (10 + 5) / 20`That is, `S = .75 or 75 points` | 
| RTO/RPO compliance (P) | A normalized score (0 -100 points) based on the application meeting its resiliency policy.  | P = Total weights of disruption types meeting the application's resiliency policy / Total weights of all disruption types. | If you application resiliency policy meets only for Availability Zone (AZ) and Infrastructure disruption types, the resiliency policy score (P) is calculated as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html) | 

The following table explains the formula used by AWS Resilience Hub to calculate the resiliency score for your entire application.


**Formula to calculate the Resiliency score**  

| Scoring component | Description | Formula | Example | 
| --- | --- | --- | --- | 
| Resiliency score for application (RS) | A normalized resiliency score (0 -100 points) based on your application meeting its resiliency policy. Resiliency score per application is the weighted average of all the recommendation types. That is: RS = Weighted Average (T, A, S, P) | Resiliency score per application is calculated using the following formula: RS = (T \$1 Weight(T) \$1`A * Weight(A) +``S * Weight(S) +``P * Weight(P)) /``(Weight(T) + Weight(A) + Weight(S) + Weight(P))` | Formulas to calculate the coverage of each recommendation type table are as follows: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html)The resiliency score per application is calculated as follows: `RS = ((.75 * .2) + (.75 * .2) + (.75 * .2) + (.5 * .4)) /(.2 + .2 + .2 + .4)`That is, `RS = .65 or 65 points` | 

The following table explains the formulas used by AWS Resilience Hub to calculate the resiliency score for Application Components (AppComponents) and disruption types. However, you can obtain the resiliency score of AppComponents and disruption types only through the following AWS Resilience Hub APIs:
+ [DescribeAppAssessment](https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_DescribeAppAssessment.html) to obtain `RSo`
+ [ListAppComponentCompliances](https://docs.aws.amazon.com/resilience-hub/latest/APIReference/API_ListAppComponentCompliances.html) to obtain `RSao` and `RSA`


**Formulas to calculate resiliency score for AppComponents and disruption types**  

| Scoring component | Description | Formula | Example | 
| --- | --- | --- | --- | 
| Resiliency score per AppComponent and per disruption type (RSao) | A normalized score (0 -100 points) based on the AppComponent meeting its resiliency policy per disruption type. Resiliency score per AppComponent and per disruption type is the weighted average of all the recommendation types. That is: `RSao = Weighted Average (T, A, S, P)`The values for `T, A, S, P` are calculated for all the recommended tests, alarms, SOPs, and meeting resiliency policy of the AppComponent and the disruption type. | The resiliency score per AppComponent and per disruption type is calculated using the following formula:`RSao = (T * Weight(T) + ``A * Weight(A) + ``S * Weight(S) + ``P * Weight(P)) /``(Weight(T) + Weight(A) + Weight(S) + Weight(P))` | `RSao` assumptions for all the recommendation types are as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html)The resiliency score per AppComponent and disruption type is calculated as follows:`RSao = ((.75 * .2) + (.75 * .2) + (.75 * .2) + (.5 * .4)) / `(.2 \$1 .2 \$1 .2 \$1 .4)That is, `RSao = .65 or 65 points`  | 
| Resiliency score per AppComponent ( RSa) | A normalized score (0 -100 points) based on meeting its resiliency policy. Resiliency score per AppComponent is the weighted average of all the recommendation types. That is: RSa = Weighted Average (T, A, S, P)The values for `T, A, S, P` are calculated for all the recommended tests, alarms, SOPs, and meeting resiliency policy of the AppComponent. | The resiliency score per AppComponent is calculated using the following formula: `RSa = ``(T * Weight(T) +``A * Weight(A) +``S * Weight(S) +``P * Weight(P)) /``(Weight(T) + Weight(A) + Weight(S) + Weight(P))` | `RSa` assumptions for all the recommendation types are as follows:[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html)The resiliency score per AppComponent is calculated as follows:`RSa = ((.75 * .2) + (.75 * .2) + (.75 * .2) + (.5 * .4)) / `(.2 \$1 .2 \$1 .2 \$1 .4)That is, `RSa = .65 or 65 points`  | 
| Resiliency score per disruption type ( RSo) | A normalized score (0 -100 points) based on meeting its resiliency policy. Resiliency score per disruption type is the weighted average of all the recommendation types. That is: RSo = Weighted Average (T, A, S, P)The values for `T, A, S, P` are calculated for all the recommended tests, alarms, SOPs, and meeting resiliency policy of the disruption type. | The resiliency score per disruption type is calculated using the following formula:`RSo = (T * Weight(T) + A * Weight(A) + ``S * Weight(S) + P * Weight(P)) /` `(Weight(T) + Weight(A) + Weight(S) + Weight(P))` |  `RSo` assumptions for all the recommendation types are as follows: [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/resilience-hub/latest/userguide/calculate-score.html) The resiliency score per disruption type is calculated as follows: `RSo = ((.75 * .2) + (.75 * .2) + (.75 * .2) + (.5 *.4)) /` `(.2 + .2 + .2 + .4)` That is, `RSo = .65 or 65 points`  | 

## Weights
<a name="weight"></a>

AWS Resilience Hub assigns a weight to each recommendation type for the total resiliency score.

The following tables show the weight for alarms, SOPs, tests, meeting resiliency policy, and disruption types. Disruptions type include Application, Infrastructure, AZ, and Region.

**Note**  
If you choose not to define Regional RTO or RPO targets for your policy, the weights for the other disruption types are increased accordingly as shown in **Weight when Region is not defined** column.


**Weights for alarms, SOPs, tests, policy target**  

| Recommendation type | Weight | 
| --- | --- | 
| Alarms | 20 points | 
| SOPs | 20 points | 
| Tests | 20 points | 
| Meeting resiliency policy | 40 points | 


**Weights for disruption type**  

| Disruption type | Weight when Region is defined | Weight when Region is not defined | 
| --- | --- | --- | 
| Application | 40 points | 44.44 points | 
| Infrastructure | 30 points | 33.33 points | 
| Availability Zone | 20 points | 22.22 points | 
| Region | 10 points | N/A | 