You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-6
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
## Description
4
4
5
-
`failure-lambda` is a small Node module for injecting failure into AWS Lambda (https://aws.amazon.com/lambda). It offers a simple failure injection wrapper for your Lambda handler where you then can choose to inject failure by setting the `failureMode` to `latency`, `exception`, `statuscode`or `diskspace`. You control your failure injection using SSM Parameter Store.
5
+
`failure-lambda` is a small Node module for injecting failure into AWS Lambda (https://aws.amazon.com/lambda). It offers a simple failure injection wrapper for your Lambda handler where you then can choose to inject failure by setting the `failureMode` to `latency`, `exception`, `blacklist`, `diskspace`or `statuscode`. You control your failure injection using SSM Parameter Store.
5. Add an environment variable to your Lambda function with the key FAILURE_INJECTION_PARAM and the value set to the name of your parameter in SSM Parameter Store.
31
31
6. Try it out!
@@ -36,12 +36,13 @@ Edit the values of your parameter in SSM Parameter Store to use the failure inje
36
36
37
37
*`isEnabled: true` means that failure is injected into your Lambda function.
38
38
*`isEnabled: false` means that the failure injection module is disabled and no failure is injected.
39
-
*`failureMode` selects which failure you want to inject. The options are `latency`, `exception` or `statuscode` as explained below.
39
+
*`failureMode` selects which failure you want to inject. The options are `latency`, `exception`, `blacklist`, `diskspace` or `statuscode` as explained below.
40
40
*`rate` controls the rate of failure. 1 means that failure is injected on all invocations and 0.5 that failure is injected on about half of all invocations.
41
41
*`minLatency` and `maxLatency` is the span of latency in milliseconds injected into your function when `failureMode` is set to `latency`.
42
42
*`exceptionMsg` is the message thrown with the exception created when `failureMode` is set to `exception`.
43
43
*`statusCode` is the status code returned by your function when `failureMode` is set to `statuscode`.
44
44
*`diskSpace` is size in MB of the file created in tmp when `failureMode` is set to `diskspace`.
45
+
*`blacklist` is an array of regular expressions, if a connection is made to a host matching one of the regular expressions it will be blocked.
45
46
46
47
## Example
47
48
@@ -57,9 +58,14 @@ Inspired by Yan Cui's articles on latency injection for AWS Lambda (https://hack
57
58
58
59
## Changelog
59
60
61
+
### 2020-02-17 v0.2.0
62
+
63
+
* Added blacklist failure.
64
+
* Updated example application to retrive file from S3 based on URL from DynamoDB.
65
+
60
66
### 2020-02-13 v0.1.1
61
67
62
-
* Fixed issue with exception injection not throwing the exception. Thanks to [Jason Barto](https://github.com/jpbarto)!
68
+
* Fixed issue with exception injection not throwing the exception.
63
69
64
70
### 2019-12-30 v0.1.0
65
71
@@ -70,6 +76,8 @@ Inspired by Yan Cui's articles on latency injection for AWS Lambda (https://hack
0 commit comments