forked from danielireson/formplug
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
51 lines (48 loc) · 1.11 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
service: ${file(config.json):SERVICE_NAME}
plugins:
- serverless-plugin-include-dependencies
provider:
name: aws
runtime: nodejs4.3
stage: ${file(config.json):STAGE}
region: ${file(config.json):REGION}
iamRoleStatements:
- Effect: "Allow"
Action:
- "lambda:InvokeFunction"
Resource: "*"
- Effect: "Allow"
Action:
- "sqs:SendMessage"
Resource: "*"
- Effect: "Allow"
Action:
- "ses:*"
Resource: ${file(config.json):FROM_ARN}
functions:
encrypt:
handler: handlers/encrypt/handler.handle
events:
- http:
path: /encrypt/{_email}
method: any
request:
parameters:
querystrings:
_format: true
paths:
_email: true
receive:
handler: handlers/receive/handler.handle
events:
- http:
path: /to/{_to}
method: post
request:
parameters:
querystrings:
_format: true
paths:
_to: true
send:
handler: handlers/send/handler.handle