-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathserverless.yml
55 lines (50 loc) · 1.19 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
service: go-todo
frameworkVersion: '>=1.28.0 <2.0.0'
provider:
name: aws
runtime: go1.x
stage: dev
region: ap-northeast-2
deploymentBucket: ${file(./.go-serverless-demo.yml):DEPLOYMENT_BUCKET}
environment:
DYNAMO_REGION: ${file(./.go-serverless-demo.yml):DYNAMO_REGION}
DYNAMO_TABLE_NAME: ${file(./.go-serverless-demo.yml):DYNAMO_TABLE_NAME}
tracing:
lambda: true
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
Resource: "arn:aws:dynamodb:ap-northeast-2:*:table/*"
plugins:
- serverless-apigw-binary
custom:
apigwBinary:
types:
- 'application/json'
- 'text/html'
package:
exclude:
- ./**
include:
- ./bin/**
- ./.go-serverless-demo.yml
functions:
rest:
handler: bin/rest
timeout: 2 # optional, in seconds, default is 6
# provisionedConcurrency: 1 # optional, Count of provisioned lambda instances
events:
- http:
path: /{proxy+}
method: ANY
cors: true
- http:
path: /{proxy+}
method: OPTIONS
cors: true