-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
82 lines (67 loc) · 1.61 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
service: webrivage-foosball-api
plugins:
- serverless-plugin-typescript
- serverless-dynamodb-local
# - serverless-plugin-localstack
- serverless-mocha-plugin
- serverless-secrets-plugin
# - serverless-localstack-resources
custom:
localstack:
debug: true
stages:
- dev
host: http://localstack
# host: http://localhost
dynamodb:
start:
noStart: false
port: 4569
migrate: true
# seed: true
seed:
dev:
sources:
- table: ${self:provider.stage}_foosball_players
sources: [./data/seed/dynamodb/players-dev.json]
secretsFilePathPrefix: config
provider:
name: aws
runtime: nodejs6.10
region: eu-west-1
# region: us-east-1
profile: recipeez_serverless_dev
vpc:
securityGroupIds:
- sg-768a9e0d
subnetIds:
- subnet-990563ef
- subnet-62aac006
- subnet-49962211
stage: ${opt:stage, 'dev'}
memorySize: 128
environment:
STAGE: ${self:provider.stage}
# DYNAMODB_ENDPOINT: http://localhost:4569
DYNAMODB_TABLE_PLAYER: ${self:provider.stage}_foosball_players
functions:
www:
handler: src/API/handler.index
events:
- http: ANY /
- http: 'ANY {proxy+}'
resources:
Resources:
PlayersTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: ${self:provider.stage}_foosball_players
AttributeDefinitions:
- AttributeName: uuid
AttributeType: S
KeySchema:
- AttributeName: uuid
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1