Skip to main content
In this lesson you’ll prepare the prerequisites for running an Availability Zone (AZ) power-interruption experiment using AWS Fault Injection Simulator (FIS). We’ll create an IAM role that FIS can assume and attach the task policy containing the permissions required to simulate an AZ-level power interruption. Overview:
  • Create a trust role that only FIS can assume.
  • Inspect the experiment folder and key files.
  • Review the essential task-policy statements required by the experiment.
  • Attach the task policy to the role so the experiment can run.

1) Create the IAM role (trust policy)

The AZ experiment folder contains a trust policy file named fis-az-experiment-policy.json. This trust policy allows only the FIS service to assume the role. Run the following command (assumes fis-az-experiment-policy.json is in the current directory):
Example output:

2) Review the experiment folder

List the experiment folder to inspect the files that accompany the AZ experiment:
Quick reference: key files and their purpose
This role requires broad permissions because an AZ power interruption touches multiple services (network ACLs, compute, databases, caching, and tagging). The policy also scopes destructive actions using tags to minimize blast radius.

3) Key policy statements (fis-az-task-policy.json)

Below is a concise, cleaned representation of the relevant statements from fis-az-task-policy.json. These statements grant the FIS role the ability to log experiment activity, manage temporary network ACLs to simulate network isolation, and perform failover/restart operations on database and cache resources.
Notes on the primary statements:
  • CloudWatch Logs actions are permitted so FIS can create and manage log delivery for experiments.
  • Network ACL creation, tagging, entry creation/deletion, and deletion are restricted by the managedByFIS tag to limit impact to resources the experiment manages.
  • RDS and ElastiCache actions allow failing over or rebooting database and cache resources to simulate AZ-level failures.
  • Tag-based resource resolution (tag:GetResources) enables FIS to select targets by tags.
  • EC2 instance StartInstances and StopInstances allow lifecycle operations as part of the simulation.

4) Attach the task policy to the role

After creating the role, attach the task policy using put-role-policy:
Example (no output on success):
Always follow the principle of least privilege. Before running experiments that perform destructive actions, validate the role and policy in a controlled environment and ensure that tag scoping (for example, managedByFIS) is correctly applied to limit the blast radius.
Now the FIS role is created and associated with the task policy that enables the AZ power-interruption simulation. You can run the experiment using this role and the fis-az-experiment-template.json experiment template.

Watch Video