actionAZ:ELBv2

fail_az

Simulates the loss of an AZ in an AWS Region for LBs

Activity as code

Below are the details and signature of the activity Python module.

Typeaction
Moduleazchaosaws.elbv2.actions
Namefail_az
Returnmapping

This function simulates the loss of an AZ in an AWS Region for LBs by disabling the failed az subnets in the ALB. Does not support NLBs.

Usage

JSON

{
  "name": "fail_az",
  "type": "action",
  "provider": {
    "type": "python",
    "module": "azchaosaws.elbv2.actions",
    "func": "fail_az",
    "arguments": {
      "az": "",
      "dry_run": true
    }
  }
}

YAML

name: fail_az
provider:
  arguments:
    az: ""
    dry_run: true
  func: fail_az
  module: azchaosaws.elbv2.actions
  type: python
type: action

Arguments

NameTypeDefaultRequiredTitleDescription
azstringYesAvailability ZoneAZ to target
tagsList[Dict[str, str]][{"Key": "AZ_FAILURE", "Value": "True"}]NoTagsMatch only resources with these tags
dry_runboolfalseNoDry RunOnly perform a dry run for it

Required:

Optional:

Return structure

{
  "AvailabilityZone": str,
  "DryRun": bool,
  "LoadBalancers": [
    {
      "LoadBalancerName": str,
      "Type": str,
      "Before": {
        "SubnetIds": List[str]
      },
      "After": {
        "SubnetIds": List[str]
      }
    }
  ]
}

Signature

def fail_az(
    az: str = None,
    dry_run: bool = None,
    tags: List[Dict[str, str]] = [{"Key": "AZ_FAILURE", "Value": "True"}],
    state_path: str = "fail_az.{}.json".format(__package__.split(".", 1)[1]),
    configuration: Configuration = None,
) -> Dict[str, Any]:
    pass