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
+38-4
Original file line number
Diff line number
Diff line change
@@ -2,9 +2,9 @@
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`, `denylist`, `diskspace` or `statuscode`. 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`, `denylist`, `diskspace` or `statuscode`. You control your failure injection using SSM Parameter Store or [AWS AppConfig](https://docs.aws.amazon.com/appconfig/latest/userguide/what-is-appconfig.html).
6
6
7
-
## How to install
7
+
## How to install with parameter in 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
-
6. Try it out!
31
+
6. Add permissions to the parameter for your Lambda function.
32
+
7. Try it out!
33
+
34
+
## How to install with hosted configuration in AWS AppConfig
4. Create Application, Environment, Configuration Profile, and Hosted Configuration in AppConfig console.
51
+
5. Deploy a version of the configuration.
52
+
6. Add the AWS AppConfig layer for Lambda extensions to your Lambda function. [See details](https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-integration-lambda-extensions.html).
53
+
7. Add environment variables to your Lambda function.
54
+
```bash
55
+
FAILURE_APPCONFIG_APPLICATION: YOUR APPCONFIG APPLICATION
56
+
FAILURE_APPCONFIG_ENVIRONMENT: YOUR APPCONFIG ENVIRONMENT
57
+
FAILURE_APPCONFIG_CONFIGURATION: YOUR APPCONFIG CONFIGURATION PROFILE
58
+
```
59
+
8. Add permissions to the AppConfig Application, Environment, and Configuration Profile for your Lambda function.
60
+
9. Try it out!
32
61
33
62
## Usage
34
63
35
-
Edit the values of your parameter in SSM Parameter Store to use the failure injection module.
64
+
Edit the values of your parameter in SSM Parameter Store or hosted configuration in AWS AppConfig to use the failure injection module.
36
65
37
66
*`isEnabled: true` means that failure is injected into your Lambda function.
38
67
*`isEnabled: false` means that the failure injection module is disabled and no failure is injected.
@@ -58,6 +87,11 @@ Inspired by Yan Cui's articles on latency injection for AWS Lambda (https://hack
58
87
59
88
## Changelog
60
89
90
+
### 2020-10-25 v0.4.0
91
+
92
+
* Added optional support for AWS AppConfig, allowing to validate failure configuration, deploy configuration using gradual or non-gradual deploy strategy, monitor deployed configuration with automatical rollback if CloudWatch Alarms is configured, and caching of configuration.
93
+
* Hardcoded default configuration with `isEnabled: false`, to use if issues loading configuration from Parameter Store or AppConfig.
94
+
61
95
### 2020-10-21 v0.3.1
62
96
63
97
* Change mitm mode back to connect to fix issue with all connections being blocked.
0 commit comments