-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
46 lines (39 loc) · 859 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
# serverless.yml
service: expressApp
custom :
tableName : user-table-${self:provider.stage}
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
environment:
USERS_TABLE: ${self:custom.tableName}
functions:
app:
handler: index.handler
events:
- http:
path: /
method: GET
- http:
path: /user
method: GET
- http:
path: /user
method: POST
resources:
Resources:
UsersDynamoDBTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.tableName}
AttributeDefinitions:
- AttributeName: email
AttributeType: S
KeySchema:
- AttributeName: email
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1