Skip to main content

EBS loss by ID

EBS loss by ID disrupts the state of EBS volume by detaching it from the node (or EC2) instance using volume ID for a certain duration.

  • In case of EBS persistent volumes, the volumes can self-attach and the re-attachment step can be skipped.
  • It tests the deployment sanity (replica availability and uninterrupted service) and recovery workflows of the application pod.

EBS Loss By ID


View fault usage
It tests the deployment sanity (replica availability and uninterrupted service) and recovery workflows of the application pod.


  • Kubernetes > 1.16.
  • Adequate AWS access to attach or detach an EBS volume for the instance.
  • Create a Kubernetes secret that has the AWS access configuration(key) in the CHAOS_NAMESPACE. Below is a sample secret file:
apiVersion: v1
kind: Secret
name: cloud-secret
type: Opaque
cloud_config.yml: |-
# Add the cloud AWS credentials respectively
aws_access_key_id = XXXXXXXXXXXXXXXXXXX
aws_secret_access_key = XXXXXXXXXXXXXXX
  • If you change the secret key name (from cloud_config.yml), ensure that you update the AWS_SHARED_CREDENTIALS_FILE environment variable in the chaos experiment with the new name.

Permissions required

Here is an example AWS policy to execute the fault.

View policy for the fault
"Version": "2012-10-17",
"Statement": [
"Effect": "Allow",
"Action": [
"Resource": "*"
"Effect": "Allow",
"Action": "ec2:DescribeVolumes",
"Resource": "*"
"Effect": "Allow",
"Action": [
"Resource": "*"

Refer to the superset permission/policy to execute all AWS faults.

Default validations

EBS volume is attached to the instance.

Fault tunables

Fault tunables

Mandatory fields

Variables Description Notes
EBS_VOLUME_ID Comma-separated list of volume IDs subject to EBS detach. For example, ebs-vol-1,ebs-vol-2.
REGION Region name for the target volumes. For example, us-east-1.

Optional fields

Variables Description Notes
TOTAL_CHAOS_DURATION Duration that you specify, through which chaos is injected into the target resource (in seconds). Defaults to 30s.
CHAOS_INTERVAL Time interval between the attachment and detachment of the volumes (in seconds). Defaults to 30s.
SEQUENCE Sequence of chaos execution for multiple volumes. Defaults to parallel. Supports serial sequence as well.
RAMP_TIME Period to wait before and after injecting chaos (in seconds). For example, 30s.

Fault examples

Common and AWS-specific tunables

Refer to the common attributes and AWS-specific tunables to tune the common tunables for all faults and aws specific tunables.

Detach volumes by ID

It contains a comma-separated list of volume IDs that will be subject to EBS detach. You can tune it using the EBS_VOLUME_ID environment variable.

Use the following example to tune it:

# contains EBS volume ID 
kind: ChaosEngine
name: engine-nginx
engineState: "active"
chaosServiceAccount: litmus-admin
- name: ebs-loss-by-id
# ID of the EBS volume
value: 'ebs-vol-1'
# region for the EBS volume
- name: REGION
value: 'us-east-1'
VALUE: '60'