-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
51 lines (45 loc) · 1008 Bytes
/
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: mandrillaxe
provider:
name: aws
runtime: python2.7
region: ap-southeast-2
memorySize: 128
# cfLogs: true
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:GetItem
- dynamodb:PutItem
Resource:
- Fn::Join:
- ""
- - "arn:aws:dynamodb:${self:provider.region}:"
- Ref: AWS::AccountId
- ":table/Config"
package:
exclude:
- .npmignore
- event.json
functions:
sendEmail:
handler: handler.send_email
events:
- http:
method: post
path: send/{uuid}
cors: true
resources:
Resources:
ConfigTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Config
AttributeDefinitions:
- AttributeName: uuid
AttributeType: S
KeySchema:
- AttributeName: uuid
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 5
WriteCapacityUnits: 5