HEX
Server: Apache
System: Linux vps-cdc32557.vps.ovh.ca 5.15.0-156-generic #166-Ubuntu SMP Sat Aug 9 00:02:46 UTC 2025 x86_64
User: hanode (1017)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/lib/python3/dist-packages/awscli/examples/fis/create-experiment-template.rst
**To create an experiment template**

The following ``create-experiment-template`` example creates an experiment template in your AWS FIS account. ::

    aws fis create-experiment-template \ 
        --cli-input-json file://myfile.json

Contents of ``myfile.json``::

    {
        "description": "experimentTemplate",
        "stopConditions": [
            {
                "source": "aws:cloudwatch:alarm",
                "value": "arn:aws:cloudwatch:us-west-2:123456789012:alarm:alarmName"
            }
        ],
        "targets": {
            "Instances-Target-1": {
                "resourceType": "aws:ec2:instance",
                "resourceArns": [
                    "arn:aws:ec2:us-west-2:123456789012:instance/i-12a3b4c56d78e9012"
                ],
                "selectionMode": "ALL"
            }
        },
        "actions": {
            "reboot": {
                "actionId": "aws:ec2:reboot-instances",
                "description": "reboot",
                "parameters": {},
                "targets": {
                    "Instances": "Instances-Target-1"
                }
            }
        },
        "roleArn": "arn:aws:iam::123456789012:role/myRole"
    }

Output::

    {
        "experimentTemplate": {
            "id": "ABCDE1fgHIJkLmNop",
            "description": "experimentTemplate",
            "targets": {
                "Instances-Target-1": {
                    "resourceType": "aws:ec2:instance",
                    "resourceArns": [
                        "arn:aws:ec2:us-west-2:123456789012:instance/i-12a3b4c56d78e9012"
                    ],
                    "selectionMode": "ALL"
                }
            },
            "actions": {
                "reboot": {
                    "actionId": "aws:ec2:reboot-instances",
                    "description": "reboot",
                    "parameters": {},
                    "targets": {
                        "Instances": "Instances-Target-1"
                    }
                }
            },
            "stopConditions": [
                {
                    "source": "aws:cloudwatch:alarm",
                    "value": "arn:aws:cloudwatch:us-west-2:123456789012:alarm:alarmName"
                }
            ],
            "creationTime": 1616434850.659,
            "lastUpdateTime": 1616434850.659,
            "roleArn": "arn:aws:iam::123456789012:role/myRole",
            "tags": {}
        }
    }

For more information, see `Create an experiment template <https://docs.aws.amazon.com/fis/latest/userguide/working-with-templates.html#create-template>`__ in the *AWS Fault Injection Simulator User Guide*.