-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.yml
50 lines (45 loc) · 1.06 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
service: serverless-rest-api-with-dynamodb
frameworkVersion: ">=1.1.0 <2.0.0"
provider:
name: aws
region: us-west-2
runtime: nodejs8.10
environment:
DYNAMODB_TABLE: sequences
CURRENT_REGION: us-west-2
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
Resource: "arn:aws:dynamodb:us-west-2:*:table/${self:provider.environment.DYNAMODB_TABLE}"
functions:
get:
handler: refseq/sequence.get
events:
- http:
path: sequence/{checksum}
method: get
request:
parameters:
querystring:
start: false
end: false
paths:
checksum: true
cors: true
metadata:
handler: refseq/metadata.get
events:
- http:
path: sequence/{checksum}/metadata
method: get
cors: true
info:
handler: refseq/info.get
events:
- http:
path: sequence/service-info
method: get
cors: true