-
Notifications
You must be signed in to change notification settings - Fork 6
/
README.md
55 lines (42 loc) · 1.99 KB
/
README.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# lambda_functions :cloud: :penguin: #
[![Build Status](https://travis-ci.com/cisagov/lambda_functions.svg?branch=develop)](https://travis-ci.com/cisagov/lambda_functions)
`lambda_functions` is a tool for building environment zip files for
scan types to be run in [AWS Lambda](https://aws.amazon.com/lambda/)
via [the `cisagov` fork](https://github.com/cisagov/domain-scan) of
18F's [`domain-scan`](https://github.com/18F/domain-scan).
## Examples ##
### All scanners ###
Building the environment zip files for all scanners and deploying them
to AWS Lambda using `domain-scan`:
1. `cd ~/cisagov/lambda_functions`
2. `docker-compose build`
3. `docker-compose up`
4. `cp *.zip ~/cisagov/domain-scan/lambda/envs/`
5. `cd ~/cisagov/domain-scan`
6. `./lambda/deploy pshtt --create`
7. `./lambda/deploy sslyze --create`
8. `./lambda/deploy trustymail --create`
### One scanner ###
Building the `pshtt` environment zip file and deploying it to AWS
Lambda using `domain-scan`:
1. `cd ~/cisagov/lambda_functions`
2. `docker-compose build build_pshtt`
3. `docker-compose up build_pshtt`
4. `cp pshtt.zip ~/cisagov/domain-scan/lambda/envs/`
5. `cd ~/cisagov/domain-scan`
6. `./lambda/deploy pshtt --create`
## Note ##
Please note that the corresponding Docker image _must_ be rebuilt
locally if the script `<scanner>/build_<scanner>.sh` changes. Given
that rebuilding the Docker image is very fast (due to Docker's
caching) if the script has not changed, it is a very good idea to
_always_ run the `docker-compose build` step when using this tool.
## License ##
This project is in the worldwide [public domain](LICENSE.md).
This project is in the public domain within the United States, and
copyright and related rights in the work worldwide are waived through
the [CC0 1.0 Universal public domain
dedication](https://creativecommons.org/publicdomain/zero/1.0/).
All contributions to this project will be released under the CC0
dedication. By submitting a pull request, you are agreeing to comply
with this waiver of copyright interest.