-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
59 lines (53 loc) · 1.17 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
service: &service asana-mapper-service
custom:
writeEnvVars:
AUTH_SECRET: ${env:AUTH_SECRET}
AUTH_TOKEN: ${env:AUTH_TOKEN}
STAGE: ${opt:stage}
PROJECT_NAME: *service
BASE_URL: ${env:BASE_URL}
NODE_ENV: ${env:NODE_ENV}
provider:
name: aws
runtime: nodejs6.10
iamRoleStatements:
- Effect: Allow
Action:
- lambda:InvokeFunction
- lambda:InvokeAsync
Resource: "*"
functions:
requestsPost:
handler: lambdas/requests-post/index.handler
timeout: 60
events:
- http:
path: requests
method: POST
authorizer: auth
auth:
handler: lambdas/auth/index.handler
Outputs:
ServiceName:
Description: Service name
Value: asana-mapper
ServiceVersion:
Description: Service version
Value: 1
ServiceStage:
Description: Service deployment stage
Value: ${opt:stage}
RestApiName:
Description: API Gateway Rest API name
Value:
Fn::Join:
- "-"
-
- ${opt:stage}
- *service
RestApiStage:
Description: API Gateway Rest API stage
Value: ${opt:stage}
plugins:
- serverless-offline
- serverless-plugin-write-env-vars