-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
74 lines (69 loc) · 1.53 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
service: socie
custom:
stage: ${opt:stage,"default"}
db_name: gbf_twitter_token_${self:custom.stage}
provider:
name: aws
runtime: go1.x
memorySize: 256
timeout: 15
region: ap-northeast-1
role: ${env:LAMBDA_IAM}
tracing:
apiGateway: true
lambda: true
package:
exclude:
- ./**
include:
- ./bin/**
functions:
request_token:
handler: bin/oath/request
environment:
CONSUMER_KEY: ${env:CK}
CONSUMER_SECRET: ${env:CS}
CALLBACK_URL: ${env:CALLBACK_URL}
events:
- http:
path: /oath/request
method: get
- http:
path: /societte
method: get
access_token:
handler: bin/oath/access
environment:
CONSUMER_KEY: ${env:CK}
CONSUMER_SECRET: ${env:CS}
DB_NAME: ${self:custom.db_name}
events:
- http:
path: /oath/callback
method: get
delete_batch:
handler: bin/batch/delete
memorySize: 2048
timeout: 600
environment:
CONSUMER_KEY: ${env:CK}
CONSUMER_SECRET: ${env:CS}
DB_NAME: ${self:custom.db_name}
events:
- schedule: cron(0 * * * ? *)
# DynamoDBを作る
resources:
Resources:
pso2commonDB:
Type: 'AWS::DynamoDB::Table'
Properties:
TableName: ${self:custom.db_name}
AttributeDefinitions:
- AttributeName: UserID
AttributeType: S
KeySchema:
- AttributeName: UserID
KeyType: HASH
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1