forked from OWASP/DVSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
72 lines (62 loc) · 2.44 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
64
65
66
67
68
69
70
71
72
##################################################
# DVSA: a Damn Vulnerable Serverless Application #
##################################################
service: dvsa
provider:
name: aws
runtime: python3.6
stage: ${env:USER}
profile: default
region: us-east-1
versionFunctions: false
timeout: 30
memorySize: 128
apiGateway:
shouldStartNameWithService: true
package:
individually: true
excludeDevDependencies: false
exclude:
- ./**
plugins:
- serverless-finch
- serverless-offline
- serverless-stack-output
- serverless-scriptable-plugin
- serverless-attach-managed-policy
- serverless-plugin-log-retention
custom:
accountId: ${file(backend/serverless/scripts/vars.js):accountId}
logRetentionInDays: 7
client:
bucketName: dvsa-website-${self:custom.accountId}
distributionFolder: client/dist
errorDocument: index.html
output:
file: ./client/src/be-stack.json
scriptHooks:
before:package:cleanup: python3 backend/serverless/scripts/onstart.py
after:package:finalize: python3 backend/serverless/scripts/verifysesaccount.py --verify
after:deploy:finalize: python3 backend/serverless/scripts/finalize.py --profile ${env:AWS_PROFILE, self:provider.profile} --region ${env:AWS_REGION, self:provider.region}
after:remove:remove: python3 backend/serverless/scripts/verifysesaccount.py --remove
functions:
- ${file(backend/src/functions/order-manager/sls.yml):functions}
- ${file(backend/src/functions/order/sls.yml):functions}
- ${file(backend/src/functions/processing/sls.yml):functions}
- ${file(backend/src/functions/admin/sls.yml):functions}
- ${file(backend/src/functions/cronjobs/sls.yml):functions}
- ${file(backend/src/functions/user/sls.yml):functions}
resources:
# Resources:
- ${file(backend/serverless/resources/cognito-user-pool.yml)}
- ${file(backend/serverless/resources/cognito-identity-pool.yml)}
- ${file(backend/serverless/resources/api-gateway.yml)}
- ${file(backend/serverless/resources/dynamodb-tables.yml)}
- ${file(backend/serverless/resources/s3-buckets.yml)}
# Function Resources
- ${file(backend/src/functions/order-manager/sls.yml):resources}
- ${file(backend/src/functions/processing/sls.yml):resources}
- ${file(backend/src/functions/order/sls.yml):resources}
- ${file(backend/src/functions/admin/sls.yml):resources}
- ${file(backend/src/functions/user/sls.yml):resources}
- ${file(backend/src/functions/cronjobs/sls.yml):resources}