Create a multi-account experiment template
To learn how to create an experiment template via the AWS Management Console
See Create an experiment template.
To create an experiment template using the CLI
-
Open the AWS Command Line Interface
-
To create an experiment from a saved JSON file with the account targeting experiment option set to
"multi-account"
(for example,my-template.json
), replace the placeholder values initalics
with your own values, and then run the following create-experiment-templatecommand. aws fis create-experiment-template --cli-input-json file://
my-template
.jsonThis will return the experiment template in the response. Copy the
id
from the response, which is the ID of the experiment template. -
Run the create-target-account-configuration
command to add a target account configuration to the experiment template. Replace the placeholder values in italics
with your own values, using theid
from step 2 as the value for the--experiment-template-id
parameter, and then run the following. The--description
parameter is optional. Repeat this step for each target account.aws fis create-target-account-configuration --experiment-template-id
EXTxxxxxxxxx
--account-id111122223333
--role-arn arn:aws:iam::111122223333
:role/role-name
--description"my description"
-
Run the get-target-account-configuration
command to retrieve the details for a specific target account configuration. aws fis get-target-account-configuration --experiment-template-id
EXTxxxxxxxxx
--account-id111122223333
-
Once you have added all your target account configurations, you can run the list-target-account-configurations
command command to see that your target account configurations have been created. aws fis list-target-account-configurations --experiment-template-id
EXTxxxxxxxxx
You can also verify that you have added target account configurations by running the get-experiment-template
command. The template will return a read-only field targetAccountConfigurationsCount
that is a count of all the target account configurations on the experiment template. -
When you are ready, you can run the experiment template using the start-experiment
command. aws fis start-experiment --experiment-template-id
EXTxxxxxxxxx