Creating AWS FIS experiments from the operational recommendations
AWS Resilience Hub recommends that you test your application after you run an assessment report. You can access and run these experiments from your application’s Assessment report.
AWS Resilience Hub provides a list of AWS FIS experiments, which are Systems Manager documents with testing parameters. When you select an AWS FIS experiment from the list, AWS Resilience Hub creates an AWS CloudFormation template with the parameters you define in the Systems Manager document. After the creation of the AWS CloudFormation stack, you can see your provisioned AWS FIS experiments for your application.
The AWS CloudFormation template consists of an IAM role for each Systems Manager document, with the minimum permissions required to run.
To create an AWS FIS experiment based on AWS Resilience Hub recommendations, you must create an AWS CloudFormation template for the recommended tests and include them in your code base.
To create an AWS CloudFormation template for the AWS FIS experiment
-
Open the AWS Resilience Hub console.
-
In the navigation pane, choose Applications.
-
From the list of applications, choose the application you want to create a test for.
-
Choose Assessments tab.
-
Select an assessment from the Resiliency assessments table. If you don't have an assessment, complete the procedure in Running resiliency assessments in AWS Resilience Hub and then return to this step.
-
Under Operational recommendations, choose Fault injection experiments.
-
Select all the tests you want to include.
-
Choose Create CloudFormation template. This can take up to a few minutes to create the AWS CloudFormation template.
-
Choose Templates.
You can view the newly created AWS CloudFormation template in Templates table.
Complete the following procedure to include the recommendations in your code base.
To include the AWS Resilience Hub recommendations in your code base
-
In Operational recommendations, choose Templates.
-
In the list of templates, choose the name of the AWS FIS experiment template you just created.
You can identify the tests that are implemented in your application using the following information:
-
Test name – Name of the test that you have created for your application.
-
Description – Describes the objective of the test.
-
State – Indicates the current implementation state of the test.
This column displays one of the following values:
-
Implemented – Indicates that the test is implemented in your application.
-
Not implemented – Indicates that the test is not implemented or included in your application.
-
Excluded – Indicates that the test is excluded from the application.
-
Inactive – Indicates that the test is deployed to AWS FIS, but it has not run in the last 30 days.
-
-
Test run – Amazon S3 URL of the document that contains the results of the latest test.
-
Source template – Provides the Amazon Resource Name (ARN) of the AWS CloudFormation stack that contains the experiment details.
-
-
Under Template details, choose the link in Templates S3 Path to open the template object in Amazon S3 console.
-
In Amazon S3 console, from Objects table, choose the test folder link.
-
To copy the Amazon S3 path, select the check box in front of the JSON file and choose Copy URL.
-
Create an AWS CloudFormation stack from AWS CloudFormation console. For more information about creating an AWS CloudFormation stack, see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-console-create-stack.html.
While creating the AWS CloudFormation stack, you must provide the Amazon S3 path that you copied from the previous step.