-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
61 lines (52 loc) · 1.94 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
custom:
myStage: ${opt:stage, self:provider.stage} #use the --stage CLI option if it exists, or use provider.stage
isDebug: ${opt:debug, ""}
stagedMessage:
dev: "DEV"
devx: "DEV"
qa: "QA"
prod: "PROD"
service: akouo-api-${self:custom.myStage}
configValidationMode: warn
provider:
name: aws
runtime: dotnet6
region: us-east-1
stage: qa #cli build params will override this!!
profile: transcriber #aws credentials file
stackName: AkouoStack${self:custom.myStage}
# deploymentBucket:
# name: sil-transcriber-lead-api # Deployment bucket name. Default is generated by the framework
environment:
SIL_TR_CONNECTIONSTRING: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_CONNECTIONSTRING}
SIL_TR_ORIGINSITES: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_ORIGINSITES}
SIL_TR_USERFILES_BUCKET: ${file(./serverless.env.yml):${self:custom.myStage}.SIL_TR_USERFILES_BUCKET}
ASPNETCORE_ENVIRONMENT: ${file(./serverless.env.yml):${self:custom.myStage}.ASPNETCORE_ENVIRONMENT}
package:
artifact: bin/release/net6.0/deploy-package_${self:custom.myStage}.zip
functions:
api:
handler: AkouoApi
name: AkouoApi-${self:custom.myStage}
timeout: 30
events:
- http:
path: /{proxy+}
method: ANY
cors:
origin: '*'
headers:
- X-Fp
- Content-Type
- X-Amz-Date
- Authorization
- X-Api-Key
- X-Amz-Security-Token
- X-Amz-User-Agent
##If the X-Fp header is not working (totally guessed on the cors stuff above)
##go to aws console, API Gateway, choose api
##Resources -> /{proxy} -> Actions Enable Cors
## Add X-Fp, to Access-Control-Allow-Headers
## Push "Enable cors and replace existing cors headers" button
##This doesn't work...so go create this s3 bucket manually
# Further instructions in file AWSConfig.txt