-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
47 lines (44 loc) · 1.13 KB
/
template.yaml
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
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Timeout: 3
Parameters:
SlackClientID:
Type: String
SlackClientSecret:
Type: String
SlackSigningSecret:
Type: String
Resources:
NickNameFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: src/
Handler: nickname.handler
Runtime: python3.8
Events:
NickName:
Type: Api
Properties:
Path: /nickname
Method: post
NickNameAgain:
Type: Api
Properties:
Path: /nickname-again
Method: post
OAuth:
Type: Api
Properties:
Path: /auth
Method: get
Environment:
Variables:
SLACK_CLIENT_ID: !Ref SlackClientID
SLACK_CLIENT_SECRET: !Ref SlackClientSecret
SLACK_SIGNING_SECRET: !Ref SlackSigningSecret
Outputs:
NickNameApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/nick/"