FIS experiments act on real AWS resources. Define the affected targets, action dependencies, permissions, and stopping criteria before running a planned test in pre-production.
Experiment templates and targets
AWS Fault InjectionFault injection deliberately disrupts resources to observe how a workload responds. Service runs controlled fault experiments to test how a workload responds to disruption. A template is the experiment blueprint: it specifies the fault actions, affected resources, stop conditionsA stop condition references a CloudWatch alarm that stops an experiment when its threshold is reached., and permissions.
How it works
- Plan the behavior to test and try it in pre-production first. FIS performs real actions on real resources.
- Define targetsA target is the set of AWS resources selected for a fault action., the resources eligible for a fault. Use resource identifiers or criteria such as tags and filters. With multiple tags, resources must match all of them.
- Limit the blast radiusThe blast radius is the scope of resources affected by an experiment., meaning the resources affected, with a selection mode. FIS selects targets before actions start and keeps that set for the experiment.
- Choose actions and parameters. Use
startAfterwhen another action must finish first. Actions without dependencies start at the beginning. - Supply an experiment role that trusts
fis.amazonaws.comand permits the required actions. An Amazon Resource NameAn Amazon Resource Name identifies a specific AWS resource., or ARN, identifies a specific resource. Restrict its resource permissions and useaws:SourceAccountandaws:SourceArntrust conditions. - Preview target selection with
actionsMode: skip-all, then run the planned experiment with stop conditions. These are CloudWatch alarms that stop the experiment when workload performance crosses an unacceptable threshold. A preview resolves targets but does not prove fault-action permissions.
| Selection mode | Effect |
|---|---|
ALL |
Every matching resource |
COUNT(n) |
A random selection of the specified number |
PERCENT(n) |
A random selection of the specified percentage, rounded down to whole resources |
Exam cues
- If the question says inject one failure into a tagged fleet, think
COUNT(1), because it selects one matching resource at random. - If the question says one disruption must finish before the next starts, think
startAfter, because declaration order does not express an execution dependency. - If the question says inspect targets without faults, think
skip-all, because it previews resolution while skipping actions. - If the question says simulate an Availability Zone power interruption, think the AZ Availability: Power Interruption scenario, because it combines compute, scaling, networking, and database disruption symptoms.
Remember
actionsModedefaults torun-all.emptyTargetResolutionModedefaults tofail.skipdoes not excuse a missing explicit identifier.- Target selection happens before any fault action starts.
- A preview can resolve a different set from a later run and does not verify fault-action permissions.
Trap: A successful target preview does not prove the experiment role can execute the faults. It tests selection while skipping those actions.
The first action completes before the dependent action starts.
The next action completes before the final dependent action starts.
Detalhes das caixas (3)
- First action
This action starts without a dependency.
- Next action
Its startAfter names the first action, so it waits for completion.
- Final action
Its startAfter names the next action, so it waits for that action to finish.
Da documentação da AWS (17)
- FIS injects real faults into real AWS resources so teams can observe workload behavior; AWS recommends planning and pre-production experiments before production.
- An FIS experiment template defines actions, targets, stop conditions, and an IAM experiment role.
- FIS resolves target resources at experiment start, before actions begin, and uses that selected set for the experiment.
- Targets can use specific resource identifiers or selection criteria such as tags and filters; a target cannot combine resource IDs with tags or filters.
- When an FIS target has multiple tags, a resource must match all specified tags.
- ALL selects every matching target resource.
- COUNT(n) selects a specified number of matching resources at random.
- PERCENT(n) selects a specified percentage of matching resources at random; fractional resource counts round down.
- An FIS action startAfter lists actions that must finish before it starts; actions without dependencies start when the experiment starts.
- The default emptyTargetResolutionMode is fail; skip allows unresolved non-identifier targets to be skipped, but missing explicitly identified targets still fail.
- Starting with actionsMode skip-all previews resolved targets without injecting faults; run-all is the default.
- An FIS target preview does not verify permission to perform fault actions and can differ from targets selected by a later run.
- The experiment role trusts fis.amazonaws.com and needs permissions for the selected actions; AWS recommends restricting permissions with resource ARNs or tags.
- AWS recommends aws:SourceAccount and aws:SourceArn conditions in the FIS role trust policy to restrict the experiment origin.
- The AZ Availability: Power Interruption scenario simulates outage symptoms including stopped compute, impaired scaling, subnet connectivity loss, and database failover.
- A stop condition uses a CloudWatch alarm to stop an FIS experiment when workload performance crosses an unacceptable threshold.
- An Amazon Resource Name, or ARN, uniquely identifies an AWS resource.
Stop conditions and recovery
FIS stop conditionsA stop condition references a CloudWatch alarm that stops an experiment when its threshold is reached. bound an experiment using workload health. Define the steady stateSteady state describes acceptable workload behavior using business or technical metrics., meaning acceptable behavior measured by business or technical metrics, and create an alarm for a deviation that should stop the test.
How it works
- Choose a metric such as latency or errors that represents acceptable behavior. Plan recovery and test in pre-production because FIS changes real resources.
- Create a CloudWatch alarm and reference its Amazon Resource NameAn Amazon Resource Name identifies a specific AWS resource., or ARN, in a stop condition with
source: aws:cloudwatch:alarm. - FIS stops the experiment when that alarm threshold is reached. An operator can also stop a running experiment manually.
- Before stopping completes, FIS finishes pending post actionsA post action restores prior resource state after a fault when that action supports recovery., the supported actions that restore a targetA target is the set of AWS resources selected for a fault action.’s prior state. Recovery depends on the fault: termination has no reversal.
- To stop all experiments and prevent new starts in the account and Region, engage the safety leverA safety lever stops experiments and prevents new experiment starts in an AWS account and Region.. A stopped experiment cannot resume; use a new experiment when another run is appropriate.
Exam cues
- If the question says stop a test automatically when checkout errors rise, think a CloudWatch alarm stop condition, because it ties experiment stopping to workload health.
- If the question says stopped faults must all roll back, think action-specific recovery, because only some actions support post actions.
- If the question says prevent every new experiment during an incident, think the safety lever, because an individual experiment stop does not provide that account and Region control.
Remember
- Stop condition source:
aws:cloudwatch:alarm; its value is the alarm ARN. source: nonedeclares no stop condition.startInstancesAfterDurationoptionally restarts stopped instances. Terminated instances cannot restart.completeIfInstancesTerminateddefaults tofalse.- Safety levers are disengaged by default and apply per account and Region.
Trap: Stopping an experiment does not reverse every effect. Check the action’s recovery behavior, especially when termination or Auto Scaling has removed an instance.
The CloudWatch alarm threshold triggers the experiment stop condition.
FIS completes pending supported post actions before the experiment stops.
Detalhes das caixas (3)
- Health alarm
A CloudWatch alarm expresses the workload threshold chosen as a stop condition.
- FIS experiment
The referenced stop condition causes FIS to stop the running experiment.
- Post actions
Pending supported post actions finish before stopping completes. Terminated resources cannot be restored.
Da documentação da AWS (12)
- A steady state describes acceptable workload behavior using business or technical metrics such as latency, CPU load, or retries.
- An FIS stop condition references a CloudWatch alarm; if its threshold is reached during the experiment, FIS stops the experiment.
- A CloudWatch stop condition uses source aws:cloudwatch:alarm and the alarm ARN as value; source none declares no stop condition.
- A running FIS experiment can be stopped manually at any time; a stopped experiment cannot be resumed.
- When an FIS experiment is stopped, pending post actions finish before the experiment stops.
- Only some actions support post actions that restore prior state; a terminated EC2 instance cannot be recovered by a post action.
- The FIS stop-instances parameter startInstancesAfterDuration optionally starts stopped instances after a configured interval.
- An Auto Scaling group can terminate an FIS-stopped instance before restart; completeIfInstancesTerminated can allow that action to complete and defaults to false.
- A safety lever stops running FIS experiments and prevents new ones in its account and Region; safety levers are disengaged by default.
- After a safety lever is disengaged, a new experiment can be started from the same template, but a stopped or cancelled experiment cannot resume.
- AWS recommends planning and running FIS experiments in pre-production before production because faults affect real resources.
- An Amazon Resource Name, or ARN, uniquely identifies an AWS resource.
Cross-account experiments
A multi-account FIS experiment injects faults into a workload spread across AWS accounts within one Region. The orchestrator accountThe orchestrator account owns and manages a multi-account experiment and its template. owns and starts the experiment; each target accountA target account contains resources that a multi-account experiment can affect. supplies a role that permits actions on its resources.
How it works
- Set
accountTargetingtomulti-account. Add one target account configuration for each target account with itsaccountIdandroleArn; the description is optional. - Create the orchestrator experiment role. Its trust policyA trust policy defines who may assume an IAM role. allows FIS to assume it, and its permissions allow
sts:AssumeRoleon the configured targetA target is the set of AWS resources selected for a fault action. roles. - In each target account, trust the orchestrator role and grant the required fault-action permissions. This is role chainingRole chaining uses permissions from one IAM role to assume another IAM role.: the service uses one role to assume another. AWS examples constrain the target trust with
aws:PrincipalArnandsts:ExternalId. - Select resources using consistent tags across accounts. For matching the same Availability Zone across accounts, use an AZ IDAn Availability Zone ID consistently identifies the same zone across AWS accounts., the stable cross-account zone identifier.
- Share monitoring data through cross-account CloudWatch setup when stop conditionsA stop condition references a CloudWatch alarm that stops an experiment when its threshold is reached. depend on target-account metrics. Use read-only sharing; Metric MathMetric Math combines CloudWatch metrics into expressions that can support an experiment stop alarm. can combine metrics into an alarm for the experiment.
Exam cues
- If the question says a central account must inject faults into workload accounts, think multi-account targeting and role chaining, because the orchestrator and target roles have separate responsibilities.
- If the question says target-account health must stop the central experiment, think cross-account CloudWatch sharing, because the orchestrator needs the monitoring data for its stop condition.
- If the question says the same zone must be affected across accounts, think AZ IDs, because they identify zones consistently.
Remember
- The default targeting mode is
single-account. - Each target account configuration uses
accountIdandroleArn. - Target account IDs are unique within the template; only one role ARNAn Amazon Resource Name identifies a specific AWS resource. is configured per target account.
- Multi-account experiments stay within one Region.
- Engage the safety leverA safety lever stops experiments and prevents new experiment starts in an AWS account and Region. in the experiment’s account and Region to stop and prevent its runs.
Trap: Permission to assume a role is only one side of the chain. The target role must also trust the orchestrator and permit the selected fault actions.
FIS assumes the orchestrator experiment role.
The orchestrator role assumes the configured role in the target account.
The target role permissions authorize fault actions on resources.
Detalhes das caixas (4)
- FIS
FIS uses the experiment role in the orchestrator account.
- Orchestrator role
Trusts FIS and allows sts:AssumeRole on the configured target role.
- Target role
Trusts the orchestrator role and authorizes actions on target resources.
- Target instance
An example target resource affected by an authorized fault action.
Da documentação da AWS (12)
- FIS multi-account experiments test applications spanning multiple AWS accounts within one Region.
- The orchestrator account owns the FIS template and experiment; target accounts hold the affected resources.
- accountTargeting defaults to single-account; multi-account enables targets in other configured accounts.
- A multi-account template needs a target account configuration for each target account, including accountId, roleArn, and optional description.
- Target account IDs must be unique in a template, and only one role ARN can be configured for each target account.
- The orchestrator experiment role trusts FIS and grants sts:AssumeRole on target account roles.
- Each target role trusts the orchestrator role and grants permissions to perform fault actions on target resources.
- AWS target role trust examples restrict aws:PrincipalArn to the orchestrator role and sts:ExternalId to the orchestrator experiment ARN pattern.
- Multi-account stop conditions require cross-account CloudWatch setup with read-only sharing from target accounts; Metric Math can combine shared metrics.
- AWS recommends consistent resource tags across target accounts for multi-account FIS resource selection.
- Use Availability Zone IDs rather than AZ names for consistent cross-account zonal targeting.
- To stop and prevent multi-account experiments, engage the safety lever in the account and Region where those experiments run.
Flashcards
Nada para revisar aqui agora. Escolha outros tópicos ou outro filtro.
·
Todos os 19 flashcards em lista
A team must test whether a multi-AZ application tolerates losing an Availability Zone. Which FIS scenario fits?
Use AZ Availability: Power Interruption with scoped targets and stop conditions. It injects outage symptoms including compute loss, impaired scaling, connectivity loss, and database failover. Plan and run it in pre-production first.
What does an AWS FIS experiment template define?
Actions, targets, stop conditions, and the IAM experiment role. Starting an experiment uses that blueprint to inject the selected faults.
Which IAM role does FIS use for an experiment, and how should it be scoped?
Use an experiment role that trusts fis.amazonaws.com and grants only the required action permissions on selected resource ARNs or tags. Add aws:SourceAccount and aws:SourceArn trust conditions.
An FIS experiment must affect one randomly chosen instance from a tagged group. Which selectionMode fits?
COUNT(1). FIS randomly selects one matching resource when targets are resolved at experiment start.
An FIS experiment must finish one fault before beginning another. Which action field enforces the dependency?
Set startAfter on the later action to name the earlier action. Actions without dependencies can start at the beginning together.
A team wants to inspect FIS target selection without injecting faults. Which starting option should it use, and what does it not prove?
Use actionsMode skip-all. The preview does not prove permission to execute fault actions, and a later run can resolve different targets.
An FIS tagged target resolves no resources. What is the default outcome, and which option can allow it to be skipped?
The default emptyTargetResolutionMode is fail. Set skip to allow an unresolved non-identifier target to be skipped; a missing explicit resource identifier still fails.
An FIS checkout test must stop when the error rate reaches an unacceptable threshold. How should the team configure it?
Create a CloudWatch alarm on the error metric and add it as a stop condition with source aws:cloudwatch:alarm and the alarm ARN as value.
A team uses FIS to terminate instances. Will stopping the experiment restore those instances?
No. FIS finishes pending supported post actions before stopping, but termination cannot be reversed. A stopped experiment cannot resume.
An FIS stop-instances experiment should restart its instances later. Which parameter provides that behavior, and what can interfere?
Set startInstancesAfterDuration. Auto Scaling can terminate a stopped instance before restart; completeIfInstancesTerminated controls whether that case fails the action and defaults to false.
An operator must stop all FIS experiments and prevent new experiments in an account and Region during an incident. Which control fits?
Engage the FIS safety lever for that account and Region. It stops in-progress experiments and prevents new starts.
Can a stopped FIS experiment resume from its interrupted action?
No. Start a new experiment from the template when appropriate; if a safety lever stopped it, disengage that lever before a new run.
What does source none mean in an FIS template stopConditions entry?
No stop condition is configured. To stop on workload health, reference a CloudWatch alarm with source aws:cloudwatch:alarm.
How can an FIS experiment affect resources in another AWS account?
Set accountTargeting to multi-account and add target account configurations. The orchestrator role trusts FIS and can assume target roles, whose policies permit the fault actions.
A central FIS template must test resources in two workload accounts. Where do the template and fault-action permissions belong?
The orchestrator account owns the template and experiment. Each workload account has a target role granting fault-action permissions; the orchestrator role can assume those roles.
An FIS multi-account experiment must stop when a metric in a target account becomes unhealthy. What extra monitoring setup is needed?
Configure cross-account CloudWatch monitoring with read-only sharing from the target account. Use the resulting alarm as the experiment stop condition; Metric Math can combine shared metrics.
An FIS experiment must disrupt the same physical Availability Zone across accounts. Should it use an AZ name such as us-east-1a?
Use an AZ ID. AZ IDs consistently identify the same zone across accounts, while AZ names may map differently.
Does the default FIS accountTargeting mode reach resources in other accounts when their roles already exist?
No. The default is single-account. Configure multi-account and a target account configuration for each target account.
An FIS orchestrator has sts:AssumeRole permission, but access to a target account still fails. Which other side of the role chain must be checked?
The target role trust policy must permit the orchestrator role. Its permissions policy must also authorize the fault actions on target resources.