-
Notifications
You must be signed in to change notification settings - Fork 8
/
serverless.yml
64 lines (58 loc) · 1.46 KB
/
serverless.yml
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
56
57
58
59
60
61
62
63
service: boavizta-cloud-scanner
useDotenv: true
provider:
name: aws
runtime: rust
memorySize: 128
stage: dev
region: eu-west-1
iam:
role:
statements:
- Effect: Allow
Action: "ec2:DescribeInstances"
Resource: "*"
- Effect: Allow
Action: "cloudwatch:GetMetricStatistics"
Resource: "*"
- Effect: Allow
Action: "cloudwatch:DescribeAlarm"
Resource: "*"
environment:
BOAVIZTA_API_URL: ${env:BOAVIZTA_API_URL}
package:
individually: true
custom:
rust:
dockerless: true
# # when using local builds (dockerless), optionally provide a different target and linker for the compiler
# # for example, allow local running on ARM macs
target: x86_64-unknown-linux-musl
# linker: clang
plugins:
- serverless-rust
functions:
scan:
handler: "cloud-scanner-lambda.bootstrap-scan"
events:
- http:
path: /scan
method: get
request:
parameters:
querystrings:
use_duration_hours: true
aws_region: false
verbose_output: false
include_block_storage: false
metrics:
handler: "cloud-scanner-lambda.bootstrap-metrics"
events:
- http:
path: /metrics
method: get
request:
parameters:
querystrings:
aws_region: false
include_block_storage: false