AWS FIS actions reference - AWS Fault Injection Simulator

AWS FIS actions reference

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).

For more information, see Actions for AWS FIS and How AWS Fault Injection Simulator works with IAM.

Fault injection actions

AWS FIS supports the following fault injection actions.

aws:fis:inject-api-internal-error

Runs the AWS FIS action InjectApiInternalError on the target IAM role.

Resource type

  • aws:iam:role

Parameters

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

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

  • 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 Actions in the Amazon EC2 API Reference.

Permissions

  • fis:InjectApiInternalError

aws:fis:inject-api-throttle-error

Runs the AWS FIS action InjectApiThrottleError on the target IAM role.

Resource type

  • aws:iam:role

Parameters

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

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

  • 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 Actions in the Amazon EC2 API Reference.

Permissions

  • fis:InjectApiThrottleError

aws:fis:inject-api-unavailable-error

Runs the AWS FIS action InjectApiUnavailableError on the target IAM role.

Resource type

  • aws:iam:role

Parameters

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

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

  • 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 Actions in the Amazon EC2 API Reference.

Permissions

  • fis:InjectApiUnavailableError

Wait action

AWS FIS supports the following wait action.

aws:fis:wait

Runs the AWS FIS wait action.

Parameters

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

Permissions

  • None

Amazon EC2 actions

AWS FIS supports the following Amazon EC2 actions.

aws:ec2:reboot-instances

Runs the Amazon EC2 API action RebootInstances on the target EC2 instances.

Resource type

  • aws:ec2:instance

Parameters

  • None

Permissions

  • ec2:RebootInstances

aws:ec2:stop-instances

Runs the Amazon EC2 API action StopInstances on the target EC2 instances.

Resource type

  • aws:ec2:instance

Parameters

  • startInstancesAfterDuration – Optional. The time to wait before starting the instance. With the AWS FIS API, the value is a string in ISO 8601 format. For example, PT1M represents one minute. With the AWS FIS console, you enter the number of minutes.

Permissions

  • ec2:StopInstances

  • ec2:StartInstances

aws:ec2:terminate-instances

Runs the Amazon EC2 API action TerminateInstances on the target EC2 instances.

Resource type

  • aws:ec2:instance

Parameters

  • None

Permissions

  • ec2:TerminateInstances

Amazon ECS actions

AWS FIS supports the following Amazon ECS actions.

aws:ecs:drain-container-instances

Runs the Amazon ECS API action UpdateContainerInstancesState to drain the specified percentage of underlying Amazon EC2 instances on the target clusters.

Resource type

  • aws:ecs:cluster

Parameters

  • drainagePercentage – The percentage (1-100).

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

Permissions

  • ecs:DescribeClusterInstances

  • ecs:UpdateContainerInstancesState

  • ecs:ListContainerInstances

Amazon EKS actions

AWS FIS supports the following Amazon EKS actions.

aws:eks:terminate-nodegroup-instance

Runs the Amazon EC2 API action TerminateInstances on the target node group.

Resource type

  • aws:eks:nodegroup

Parameters

  • InstanceTerminationPercentage – The percentage (1-100) of instances to terminate.

Permissions

  • ec2:DescribeInstances

  • ec2:TerminateInstances

Amazon RDS actions

AWS FIS supports the following Amazon RDS actions.

aws:rds:failover-db-cluster

Runs the Amazon RDS API action FailoverDBCluster on the target Aurora DB cluster.

Resource type

  • aws:rds:cluster

Parameters

  • None

Permissions

  • rds:FailoverDBCluster

aws:rds:reboot-db-instances

Runs the Amazon RDS API action RebootDBInstance on the target DB instance.

Resource type

  • aws:rds:db

Parameters

  • forceFailover – Optional. If the value is true, and if instances are Multi-AZ, forces failover from one Availability Zone to another. The default is false.

Permissions

  • rds:RebootDBInstance

Systems Manager actions

AWS FIS supports the following Systems Manager actions.

aws:ssm:send-command

Runs the Systems Manager API action SendCommand on the target EC2 instances.

Resource type

  • aws:ec2:instance

Parameters

  • documentArn – The Amazon Resource Name (ARN) of the document. No default value.

  • documentVersion – Optional. The version of the document. If empty, the default version runs.

  • documentParameters – Optional. Any parameters specific to the document. With the AWS CLI, format as an escaped JSON string. With the AWS FIS console, you can use a JSON string without escaping. For more information, see Work with the AWS FIS SSM action type.

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

Permissions

  • ssm:SendCommand

  • ssm:ListCommands

  • ssm:CancelCommand