- 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 namedfis-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):
2) Review the experiment folder
List the experiment folder to inspect the files that accompany the AZ experiment: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 fromfis-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.
- 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
managedByFIStag 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
StartInstancesandStopInstancesallow lifecycle operations as part of the simulation.
4) Attach the task policy to the role
After creating the role, attach the task policy usingput-role-policy:
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.fis-az-experiment-template.json experiment template.
Links and references
- AWS Fault Injection Simulator (FIS) documentation
- IAM JSON policy reference
- Amazon RDS documentation
- Amazon ElastiCache documentation