View a markdown version of this page

AWS FIS Actions reference - AWS Fault Injection Service

AWS FIS Actions reference

An action is the fault injection activity that you run on a target using AWS Fault Injection Service (AWS FIS). AWS FIS provides preconfigured actions for specific types of targets across AWS services. You add actions to an experiment template, which you then use to run experiments.

This reference describes the common actions in AWS FIS, including information about the action parameters and the required IAM permissions. You can also list the supported AWS FIS actions using the AWS FIS console or the list-actions command from the AWS Command Line Interface (AWS CLI). Once you have the name of a specific action, you can view detailed information about the action by using the get-action command. For more information on using AWS FIS commands with the AWS CLI, see the AWS Command Line Interface User Guide and fis in the AWS CLI Command Reference.

For more information on how AWS FIS actions work, see Actions for AWS FIS and How AWS Fault Injection Service works with IAM.

Fault injection actions

AWS FIS supports the following fault injection actions.

aws:fis:inject-api-internal-error

Injects Internal Errors into requests made by the the target IAM role. The specific response depends on each service and API. For more information, please review the SDK and API documentation of your service.

Resource type
  • aws:iam:role

Parameters
  • duration – The duration, from one minute to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

  • service – The target AWS API namespace. The supported value is ec2 and kinesis.

  • percentage – The percentage (1-100) of calls to inject the fault into.

  • operations – The operations to inject the fault into, separated using commas. For a list of the API actions for the ec2 namespace, see Amazon EC2 API Reference and Amazon Kinesis Data Streams API Reference.

Permissions
  • fis:InjectApiInternalError

aws:fis:inject-api-throttle-error

Injects throttling errors into requests made by the target IAM role. The specific response depends on each service and API. For more information, please review the SDK and API documentation of your service.

Resource type
  • aws:iam:role

Parameters
  • duration – The duration, from one minute to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

  • service – The target AWS API namespace. The supported value is ec2 and kinesis.

  • percentage – The percentage (1-100) of calls to inject the fault into.

  • operations – The operations to inject the fault into, separated using commas. For a list of the API actions for the ec2 namespace, see Amazon EC2 API Reference and Amazon Kinesis Data Streams API Reference.

Permissions
  • fis:InjectApiThrottleError

aws:fis:inject-api-unavailable-error

Injects Unavailable errors into requests made by the target IAM role. The specific response depends on each service and API. For more information, please review the SDK and API documentation of your service.

Resource type
  • aws:iam:role

Parameters
  • duration – The duration, from one minute to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

  • service – The target AWS API namespace. The supported value is ec2 and kinesis.

  • percentage – The percentage (1-100) of calls to inject the fault into.

  • operations – The operations to inject the fault into, separated using commas. For a list of the API actions for the ec2 namespace, see Amazon EC2 API Reference and Amazon Kinesis Data Streams API Reference.

Permissions
  • fis:InjectApiUnavailableError

Recovery action

Recovery actions are performed to mitigate risk or protect applications after impairment.

AWS FIS supports the following recovery actions.

aws:arc:start-zonal-autoshift

Automatically shifts traffic for supported resources away from a potentially impaired Availability Zone (AZ) and reroutes them to healthy AZs in the same AWS Region. This allows for experiencing zonal autoshift through FIS. Zonal autoshift is a capability in Amazon Application Recovery Controller (ARC) that allows AWS to shift traffic for a resource away from an AZ, on your behalf, when AWS determines that there is an impairment that could potentially affect customers in the AZ.

When you run the aws:arc:start-zonal-autoshift action, AWS FIS manages the zonal shift using the StartZonalShift, UpdateZonalShift, and CancelZonalShift APIs with the expiresIn field for these requests set to 1 minute as a safety mechanism. This enables AWS FIS to quickly rollback the zonal shift in the case of any unexpected events such as network outages or system issues. In the ARC console, the expiration time field will display AWS FIS-managed, and the actual expected expiration is determined by the duration specified in the zonal shift action.

Resource type
  • aws:arc:zonal-shift-managed-resource

    Zonal shift managed resources are resource types including Amazon EKS clusters, Amazon EC2 Application and Network Load Balancers, and Amazon EC2 Auto Scaling groups that can be enabled for ARC zonal autoshift. For more information, see supported resources and enabling zonal autoshift resources in the ARC Developer Guide.

Parameters
  • duration – The length of time for which traffic will be shifted. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

  • availabilityZoneIdentifier – Traffic moves away from this AZ. This can be an AZ name (us-east-1a) or AZ ID (use1-az1).

  • managedResourceTypes – The resource types from which traffic will be shifted, separated by commas. Possible options are ASG (Auto Scaling Group), ALB (Application Load Balancer), NLB (Network Load Balancer), and EKS (Amazon EKS).

  • zonalAutoshiftStatus – The zonalAutoshiftStatus status of the resources that you want to target. Possible options are ENABLED DISABLED, and ANY. The default is ENABLED.

Permissions
  • arc-zonal-shift:StartZonalShift

  • arc-zonal-shift:GetManagedResource

  • arc-zonal-shift:UpdateZonalShift

  • arc-zonal-shift:CancelZonalShift

  • arc-zonal-shift:ListManagedResources

  • autoscaling:DescribeTags

  • tag:GetResources

Wait action

AWS FIS supports the following wait action.

aws:fis:wait

Runs the AWS FIS wait action.

Parameters
  • duration – The duration, from one minute to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

Permissions
  • None

Amazon CloudWatch actions

AWS FIS supports the following Amazon CloudWatch action.

aws:cloudwatch:assert-alarm-state

Verifies that the specified alarms are in one of the specified alarm states.

Resource type
  • None

Parameters
  • alarmArns – The ARNs of the alarms, separated by commas. You can specify up to five alarms.

  • alarmStates – The alarm states, separated by commas. The possible alarm states are OK, ALARM, and INSUFFICIENT_DATA.

Permissions
  • cloudwatch:DescribeAlarms

Amazon DynamoDB actions

AWS FIS supports the following Amazon DynamoDB action.

aws:dynamodb:global-table-pause-replication

Pauses Amazon DynamoDB multi-Region global table replication to any replica table. Tables may continue to be replicated for up to 5 minutes after action begins.

Multi-Region strongly consistent (MRSC) global tables

The following statements will be dynamically appended to the policy for the target DynamoDB MRSC global table:

{ "Statement":[ { "Sid": "DoNotModifyFisDynamoDbPauseReplicationEXPxxxxxxxxxxxxxxx", "Effect":"Deny", "Principal":{ "AWS": "*" }, "Action":[ "dynamodb:UpdateTable" ], "Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/ExampleGlobalTable", "Condition": { "DateLessThan": { "aws:CurrentTime": "2024-04-10T09:51:41.511Z" }, "ArnEquals": { "aws:PrincipalArn": "arn:aws:iam::123456789012:role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" } } }, { "Sid": "DoNotModifyFisDynamoDbPauseReplicationEXPxxxxxxxxxxxxxxxForApplicationAutoScaling", "Effect":"Deny", "Principal":{ "AWS": "*" }, "Action":[ "dynamodb:DescribeTable", "dynamodb:UpdateTable" ], "Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/ExampleGlobalTable", "Condition": { "DateLessThan": { "aws:CurrentTime": "2024-04-10T09:51:41.511Z" }, "ArnEquals": { "aws:PrincipalArn": "arn:aws:iam::123456789012:role/aws-service-role/dynamodb.application-autoscaling.amazonaws.com/AWSServiceRoleForApplicationAutoScaling_DynamoDBTable" } } } ] }

If a target table does not have any attached resource polices, a resource policy is created for the duration of the experiment, and automatically deleted when the experiment ends. Otherwise, the fault statement is inserted into an existing policy, without any additional modifications to the existing policy statements. The fault statement is then removed from the policy at the end of the experiment.

Target Amazon DynamoDB MRSC global tables are subject to an additional quota. This quota enforces that no single table may be subject to more than 5,040 minutes of impairment in a 7-day rolling window.

Multi-Region eventually consistent (MREC) global tables

The following two statements will be dynamically appended to the policy for the target DynamoDB MREC global table:

{ "Statement":[ { "Sid": "DoNotModifyFisDynamoDbPauseReplicationEXPxxxxxxxxxxxxxxxServicePrincipal", "Effect":"Deny", "Principal":{ "AWS": "*" }, "Action":[ "dynamodb:ReadDataForReplication", "dynamodb:WriteDataForReplication" ], "Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/ExampleGlobalTable", "Condition": { "StringEquals": { "aws:PrincipalServiceName": "replication.dynamodb.amazonaws.com" }, "DateLessThan": { "aws:CurrentTime": "2024-04-10T09:51:41.511Z" } } }, { "Sid": "DoNotModifyFisDynamoDbPauseReplicationEXPxxxxxxxxxxxxxxx", "Effect":"Deny", "Principal":{ "AWS": "*" }, "Action":[ "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:UpdateItem", "dynamodb:DeleteItem", "dynamodb:DescribeTable", "dynamodb:UpdateTable", "dynamodb:Scan", "dynamodb:DescribeTimeToLive", "dynamodb:UpdateTimeToLive" ], "Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/ExampleGlobalTable", "Condition": { "DateLessThan": { "aws:CurrentTime": "2024-04-10T09:51:41.511Z" }, "ArnEquals": { "aws:PrincipalArn": "arn:aws:iam::123456789012:role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" } } } ] }

The following statement will be dynamically appended to the stream policy for the target DynamoDB MREC global table:

{ "Statement":[ { "Sid": "DoNotModifyFisDynamoDbPauseReplicationEXPxxxxxxxxxxxxxxx", "Effect":"Deny", "Principal":{ "AWS": "*" }, "Action":[ "dynamodb:GetRecords", "dynamodb:DescribeStream", "dynamodb:GetShardIterator" ], "Resource":"arn:aws:dynamodb:us-east-1:123456789012:table/ExampleGlobalTable/stream/2023-08-31T09:50:24.025", "Condition": { "DateLessThan": { "aws:CurrentTime": "2024-04-10T09:51:41.511Z" }, "ArnEquals": { "aws:PrincipalArn": "arn:aws:iam::123456789012:role/aws-service-role/replication.dynamodb.amazonaws.com/AWSServiceRoleForDynamoDBReplication" } } } ] }

If a target table or stream does not have any attached resource polices, a resource policy is created for the duration of the experiment, and automatically deleted when the experiment ends. Otherwise, the fault statement is inserted into an existing policy, without any additional modifications to the existing policy statements. The fault statement is then removed from the policy at the end of the experiment.

Resource type
  • aws:dynamodb:global-table

Parameters
  • duration – In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

Permissions
  • dynamodb:PutResourcePolicy

  • dynamodb:DeleteResourcePolicy

  • dynamodb:GetResourcePolicy

  • dynamodb:DescribeTable

  • tag:GetResources

  • dynamodb:InjectError *

* The permission is only required if you are targeting MRSC global tables

Amazon Aurora DSQL actions

AWS FIS supports the following Amazon Aurora DSQL actions.

aws:dsql:cluster-connection-failure

Creates controlled connection failures in an Aurora DSQL cluster for a specified duration to test application resilience.

Resource type
  • aws:dsql:cluster

Parameters
  • duration – The duration, from one minute to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. In the AWS FIS console, you enter the number of seconds, minutes, or hours.

  • percentage – The percentage (1-100) of calls to inject the fault into.

Permissions
  • dsql:InjectError

  • dsql:GetCluster

  • tag:GetResources

To initiate the experiment with Aurora DSQL, see Fault injection testing in the Aurora DSQL User Guide.

Amazon EBS actions

AWS FIS supports the following Amazon EBS action.

aws:ebs:pause-volume-io

Pauses I/O operations on target EBS volumes. The target volumes must be in the same Availability Zone and must be attached to instances built on the Nitro System. The volumes can't be attached to instances on an Outpost.

To initiate the experiment using the Amazon EC2 console, see Fault testing on Amazon EBS in the Amazon EC2 User Guide.

Resource type
  • aws:ec2:ebs-volume

Parameters
  • duration – The duration, from one second to 12 hours. In the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute, PT5S represents five seconds, and PT6H represents six hours. In the AWS FIS console, you enter the number of seconds, minutes, or hours. If the duration is small, such as PT5S, the I/O is paused for the specified duration, but it might take longer for the experiment to complete due to the time it takes to initialize the experiment.

Permissions
  • ec2:DescribeVolumes

  • ec2:PauseVolumeIO

  • tag:GetResources

aws:ebs:volume-io-latency

Injects latency on I/O operations of target EBS volumes. The target volumes must be in the same Availability Zone. The volumes can't be attached to instances on an Outpost.

To initiate the experiment using the Amazon EC2 console, see Fault testing on Amazon EBS in the Amazon EBS User Guide.

Resource type
  • aws:ec2:ebs-volume

Parameters
  • readIOPercentage – The percentage of read I/O operations that latency will be injected on, from 0.1% to 100.%. This is the percentage of all read I/O operations on the volume that will be impacted during the experiment. The default is 100.

  • readIOLatencyMilliseconds – The amount of latency injected on read I/O operations in milliseconds, from 1ms (io2 volumes) or 10ms (non-io2 volumes) to 60 seconds. This is the latency value that will be observed on the specified percentage of the read I/O during the experiment. The default is 100.

  • writeIOPercentage – The percentage of write I/O operations that latency will be injected on, from 0.1% to 100.%. This is the percentage of all write I/O operations on the volume that will be impacted during the experiment. The default is 100.

  • writeIOLatencyMilliseconds – The amount of latency injected on write I/O operations in milliseconds, from 1ms (io2 volumes) or 10ms (non-io2 volumes) to 60 seconds. This is the latency value that will be observed on the specificed percentage of the read I/O during the experiment. The default is 100.

  • duration – The duration for which the latency will be injected, from 1 second to 12 hours.

Permissions
  • ec2:DescribeVolumes

  • ec2:InjectVolumeIOLatency

  • tag:GetResources

Amazon EC2 actions

AWS FIS supports the following Amazon EC2 actions.