Actions for AWS FIS
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.
Contents
Action identifiers
Each AWS FIS action has an identifier with the following format:
aws:service-name
:action-type
For example, the following action stops the target Amazon EC2 instances:
aws:ec2:stop-instances
For a complete list of actions, see the AWS FIS actions reference. To get the list using the AWS CLI, see List the actions.
Action parameters
Some AWS FIS actions have additional parameters that are specific to the action. These parameters are used to pass information to AWS FIS when the action is run.
AWS FIS supports custom fault types using the aws:ssm:send-command
action,
which uses the SSM Agent and an SSM command document to create the fault condition
on the targeted instances. The aws:ssm:send-command
action includes a
documentArn
parameter that takes the Amazon Resource Name (ARN) of an SSM
document as a value. You specify values for parameters when you add the action to your
experiment template.
For more information about specifying parameters for the
aws:ssm:send-command
action, see Use the aws:ssm:send-command
action.
Where possible, you can input a rollback configuration (also referred to as a post action) within the action parameters. A post action returns the target to the state that it was in before the action was run. The post action runs after the time specified in the action duration. Not all actions can support post actions. For example, if the action terminates an Amazon EC2 instance, you cannot recover the instance after it has been terminated.
Action targets
An action runs on the target resources that you specify. After you define a target, you can specify its name when you define an action.
"targets": {
"resource_type
": "resource_name
"
}
AWS FIS actions support the following resource types for action targets:
-
Auto Scaling groups – Amazon EC2 Auto Scaling groups
-
Buckets – Amazon S3 buckets
-
Cluster – Amazon EKS clusters
-
Clusters – Amazon ECS clusters or Amazon Aurora DB clusters
-
DBInstances – Amazon RDS DB instances
-
Encrypted global tables – Amazon DynamoDB; global tables encrypted with a customer managed key
-
Instances – Amazon EC2 instances
-
Nodegroups – Amazon EKS node groups
-
Pods – Kubernetes pods on Amazon EKS
-
ReplicationGroups – ElastiCache Redis Replication Groups
-
Roles – IAM roles
-
SpotInstances – Amazon EC2 Spot Instances
-
Subnets – VPC subnets
-
Tasks – Amazon ECS tasks
-
TransitGateways – Transit gateways
-
Volumes – Amazon EBS volumes
For examples, see Example actions.