forked from vgaltes/WCF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
45 lines (39 loc) · 1.04 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
service: pufouniversity
plugins:
- serverless-pseudo-parameters
- serverless-iam-roles-per-function
provider:
name: aws
runtime: nodejs8.10
region: ${opt:region, self:custom.defaultRegion}
stage: dev${env:SLSUSER, ""}
custom:
defaultRegion: eu-west-1
stage: ${opt:stage, self:provider.stage}
mastersTable: masters-${self:custom.stage}
functions:
getMasters:
handler: src/functions/getMasters.handler
events:
- http:
path: api/masters
method: get
environment:
mastersTable: ${self:custom.mastersTable}
iamRoleStatements:
- Effect: Allow
Action: dynamodb:scan
Resource: arn:aws:dynamodb:#{AWS::Region}:#{AWS::AccountId}:table/${self:custom.mastersTable}
resources:
Resources:
MastersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:custom.mastersTable}
AttributeDefinitions:
- AttributeName: id
AttributeType: N
KeySchema:
- AttributeName: id
KeyType: HASH
BillingMode: PAY_PER_REQUEST