localstack-chaos-injector
Inject and manage chaos faults and network latency in LocalStack to test AWS service resilience during development.
Instructions
Injects, manages, and clears chaos faults and network effects in LocalStack to test system resilience.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
action | Yes | The specific chaos engineering action to perform. | |
latency_ms | No | Network latency in milliseconds. Required for the 'inject-latency' action. | |
rules | No | An array of fault rules. Required for 'inject-faults', 'add-fault-rule', and 'remove-fault-rule' actions. |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"action": {
"description": "The specific chaos engineering action to perform.",
"enum": [
"inject-faults",
"add-fault-rule",
"remove-fault-rule",
"get-faults",
"clear-all-faults",
"inject-latency",
"get-latency",
"clear-latency"
],
"type": "string"
},
"latency_ms": {
"description": "Network latency in milliseconds. Required for the 'inject-latency' action.",
"minimum": 0,
"type": "integer"
},
"rules": {
"description": "An array of fault rules. Required for 'inject-faults', 'add-fault-rule', and 'remove-fault-rule' actions.",
"items": {
"additionalProperties": false,
"description": "A single rule defining a chaos fault.",
"properties": {
"error": {
"additionalProperties": false,
"description": "The custom error to return.",
"properties": {
"code": {
"description": "The AWS error code to return (e.g., 'ServiceUnavailable').",
"type": "string"
},
"statusCode": {
"description": "The HTTP status code to return (e.g., 503).",
"type": "integer"
}
},
"type": "object"
},
"operation": {
"description": "Name of the specific service operation to affect (e.g., 'CreateBucket').",
"type": "string"
},
"probability": {
"description": "The probability (0.0 to 1.0) of the fault occurring.",
"maximum": 1,
"minimum": 0,
"type": "number"
},
"region": {
"description": "Name of the AWS region to affect (e.g., 'us-east-1').",
"type": "string"
},
"service": {
"description": "Name of the AWS service to affect (e.g., 's3', 'lambda').",
"type": "string"
}
},
"type": "object"
},
"type": "array"
}
},
"required": [
"action"
],
"type": "object"
}