generated from gkatanacio/go-serverless-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
71 lines (64 loc) · 1.54 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
service: paraphraser-api
frameworkVersion: "3"
package:
individually: true
provider:
name: aws
runtime: provided.al2
architecture: arm64
deploymentMethod: direct
deploymentBucket:
name: ${env:AWS_DEPLOYMENT_BUCKET}
stage: ${env:STAGE}
region: ${env:AWS_REGION}
logRetentionInDays: ${env:AWS_LOG_RETENTION_DAYS}
httpApi:
cors: true
authorizers:
customAuthorizer:
type: request
enableSimpleResponses: true
functionName: authPassthrough # can be replaced with proper authorizer function
functions:
authPassthrough:
package:
artifact: bin/auth-passthrough.zip
handler: bootstrap
getProviders:
package:
artifact: bin/get-providers.zip
handler: bootstrap
timeout: 5
memorySize: 128
events:
- httpApi:
method: get
path: /providers
getTones:
package:
artifact: bin/get-tones.zip
handler: bootstrap
timeout: 5
memorySize: 128
events:
- httpApi:
method: get
path: /tones
paraphrase:
package:
artifact: bin/paraphrase.zip
handler: bootstrap
timeout: 20
memorySize: 128
events:
- httpApi:
method: post
path: /paraphrase
authorizer:
name: customAuthorizer
environment:
PARAPHRASE_TIMEOUT: ${env:PARAPHRASE_TIMEOUT}
CHATGPT_API_KEY: ${env:CHATGPT_API_KEY}
CHATGPT_TEMPERATURE: ${env:CHATGPT_TEMPERATURE}
GEMINI_API_KEY: ${env:GEMINI_API_KEY}
GEMINI_TEMPERATURE: ${env:GEMINI_TEMPERATURE}