-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtemplate.yaml
113 lines (108 loc) · 2.98 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
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Description: An AWS Serverless Specification template describing your function.
Resources:
DownloadToS3:
Type: 'AWS::Serverless::Function'
Properties:
Handler: download_to_s3.handler
Runtime: python3.6
Description: ''
MemorySize: 128
Timeout: 15
CodeUri: .debug/
Events:
LambdaMicroservice:
Type: Api
Properties:
Path: /download-to-s3/{video-id}
Method: ANY
DownloadToS3Permission:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName:
'Fn::GetAtt':
- DownloadToS3
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
'Fn::Sub': 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:*/*/*/*'
TranscribeAudio:
Type: 'AWS::Serverless::Function'
Properties:
Handler: transcribe_audio.handler
Runtime: python3.6
Description: ''
MemorySize: 128
Timeout: 15
CodeUri: .debug/
Events:
LambdaMicroservice:
Type: Api
Properties:
Path: /transcribe-audio/{video-name}
Method: ANY
TranscribeAudioPermission:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName:
'Fn::GetAtt':
- TranscribeAudio
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
'Fn::Sub': 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:*/*/*/*'
CheckStatus:
Type: 'AWS::Serverless::Function'
Properties:
Handler: check_status.handler
Runtime: python3.6
Description: ''
MemorySize: 128
Timeout: 15
CodeUri: .debug/
Events:
LambdaMicroservice:
Type: Api
Properties:
Path: /check-status/{job-name}
Method: ANY
CheckStatusPermission:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName:
'Fn::GetAtt':
- CheckStatus
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
'Fn::Sub': 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:*/*/*/*'
GetTranscripts:
Type: 'AWS::Serverless::Function'
Properties:
Handler: get_transcripts.handler
Runtime: python3.6
Description: ''
MemorySize: 128
Timeout: 15
CodeUri: .debug/
Events:
LambdaMicroservice:
Type: Api
Properties:
Path: /get-transcripts/{json-name}
Method: ANY
GetTranscriptsPermission:
Type: 'AWS::Lambda::Permission'
Properties:
Action: 'lambda:InvokeFunction'
FunctionName:
'Fn::GetAtt':
- GetTranscripts
- Arn
Principal: apigateway.amazonaws.com
SourceArn:
'Fn::Sub': 'arn:aws:execute-api:${AWS::Region}:${AWS::AccountId}:*/*/*/*'