-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
78 lines (71 loc) · 2.2 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
73
74
75
76
77
78
service: sparcs-email-service
frameworkVersion: ^3.25.0
custom:
projectName: sparcs-events
serviceName: email
stage: ${opt:stage, self:provider.stage}
registrations: ${self:custom.stage}-${self:custom.projectName}-registrations
entities: ${self:custom.stage}-${self:custom.projectName}-entities
emailQueue: ${self:custom.stage}-${self:custom.projectName}-email-queue.fifo
sendgridApiKeyName: ${self:custom.stage}-${self:custom.projectName}-sendgrid-api-key
frontendUrl:
dev: https://sparcs-event-platform-git-stage-sparcss-projects.vercel.app
prod: https://www.techtix.app
smtpUsernameKey: ${self:custom.projectName}-techtix-smtp-username
smtpPasswordKey: ${self:custom.projectName}-techtix-smtp-password
pythonRequirements:
useDownloadCache: false
useStaticCache: false
slim: false
dockerizePip: non-linux
noDeploy:
- requests
- boto3
- botocore
layer:
name: sparcs-events-${self:custom.stage}-python-requirements
compatibleRuntimes:
- python3.8
provider:
name: aws
runtime: python3.8
stage: dev
region: ap-southeast-1
versionFunctions: false
environment:
REGION: ${self:provider.region}
STAGE: ${self:custom.stage}
ENTITIES_TABLE: ${self:custom.entities}
EMAIL_QUEUE: ${self:custom.emailQueue}
SENDER_EMAIL: [email protected]
SENDGRID_API_KEY_NAME: ${self:custom.sendgridApiKeyName}
FRONTEND_URL: ${self:custom.frontendUrl.${self:custom.stage}}
REGISTRATIONS_TABLE: ${self:custom.registrations}
SES_SMTP_USERNAME_KEY: ${self:custom.smtpUsernameKey}
SES_SMTP_PASSWORD_KEY: ${self:custom.smtpPasswordKey}
SES_SMTP_HOST: email-smtp.ap-southeast-1.amazonaws.com
resources:
- ${file(resources/sqs.yml)}
functions:
- ${file(resources/send_email.yml)}
plugins:
- serverless-python-requirements
- serverless-iam-roles-per-function
package:
patterns:
- "!requirements.txt"
- "!.serverless/**"
- "!venv/**"
- "!node_modules/**"
- "!.idea/**"
- "!node_modules**"
- "!package.json"
- "!package-lock.json"
- "!Pipfile"
- "!Pipfile.lock"
- "!log.txt"
- "!README.md"
- "!ruff.toml"
- "!scripts/**"
- "!resources/**"
- "!__pycache__/**"