Skip to content

Commit 320a7ac

Browse files
committed
Add Guardian to the docs
1 parent 5c4a2e7 commit 320a7ac

File tree

3 files changed

+44
-0
lines changed

3 files changed

+44
-0
lines changed

README.md

+44
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ sls-dev-tools is currently being actively maintained. If you find a problem with
5959
- [Shortcuts to AWS Console](#shortcuts-to-aws-console)
6060
- [Changing region using the map](#changing-region-using-the-map)
6161
- [Shortcuts](#shortcuts)
62+
- [Guardian](#guardian)
63+
- [Usage](#usage-1)
64+
- [Configuring Rules](#configuring-rules)
65+
- [Contributing Rules](#contributing-rules)
6266

6367
[A note on AWS API calls and pricing](#a-note-on-aws-api-calls-and-pricing)\
6468
[Libs](#libs)\
@@ -95,6 +99,7 @@ If the tool isn't able to find the stack name or region in local files or in the
9599
-l, --location location of your serverless project (default is current directory)
96100
--sls use the serverless framework to execute commands
97101
--sam use the SAM framework to execute commands
102+
--guardian run CI checks on your project with sls-dev-tools Guardian
98103
```
99104

100105
- The location option allows you to specify the serverless project directory you want to work on.
@@ -196,6 +201,45 @@ Shortcuts
196201
- Pressing "l" will display a box with more statistics on the selected lambda
197202
```
198203

204+
## Guardian
205+
206+
![guardian](./img/guardian.jpeg)
207+
208+
sls-dev-tools Guardian in a highly opinionated, highly configurable, automated best-practice audit tool for Serverless architectures. Like all sls-dev-tools it's framework agnostic and can be run in one simple command.
209+
210+
sls-dev-tools Guardian can run locally, on a CI Platform or in a scheduled task to help you build with best practices from day one and resolve problems before they arise.
211+
212+
Documentation on each of the rules can be found ![here](https://theodo-uk.github.io/sls-dev-tools/docs/no-max-timeout)
213+
214+
### Usage
215+
216+
To run sls-dev-tools Guardian use the same command structure, but pass the —ci option:
217+
218+
- `sls-dev-tools --ci [-l {YOUR_PROJECT_LOCATION}] [-p {PROFILE}] [-n {YOUR_STACK_NAME}] [-r {YOUR_REGION}] [-t {START_TIME}] [-i {INTERVAL}]`
219+
220+
![guardianUse](./img/guardianUse.png)
221+
222+
### Configuring rules
223+
224+
sls-dev-tools is intended to be opinionated, but when that opinion does not match your expectations rules can be ignored on a per resource or global level.
225+
226+
To ignore a rule add a guardian section to your slsdevtools.config.js file
227+
228+
```jsx
229+
module.exports = {
230+
deploymentArgs: '--capabilities CAPABILITY_IAM --s3-bucket deployment-bucket-name',
231+
guardian: {
232+
ignore: {
233+
"no-max-memory": true, // global
234+
"no-max-memory": ["arn-1234"] // per resource
235+
"no-max-memory": "1 May 2020 09:00 GMT" // ignore until a particular date
236+
}
237+
}
238+
};
239+
```
240+
241+
Rules can be ignored globally, per resource or until a specific date (e.g. delay checking this for 1 month).
242+
199243
# A note on AWS API calls and pricing
200244

201245
This tool does make use of the AWS API to get metrics. Authentication is handled implicitly via the AWS NodeJS SDK. Pricing around Cloudwatch is designed for scale, but be warned that this tool is making calls to AWS.

img/guardian.jpeg

76.1 KB
Loading

img/guardianUse.png

303 KB
Loading

0 commit comments

Comments
 (0)