-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
56 lines (51 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
service: ibm-chatbot-function
app: ibm-chatbot
plugins:
- serverless-offline
provider:
name: aws
runtime: nodejs10.x
region: us-east-1
stackName: ibm-chatbot-stack
memorySize: 128
timeout: 2
logRetentionInDays: 3
stage: dev
apiName: ServerlessRestApi
functions:
app:
handler: index.handler
events:
- http: ANY /
- http: 'ANY {proxy+}'
environment:
ASSISTANT_ID: 4da1cd31-834c-414c-b73d-41371b056910
ASSISTANT_IAM_APIKEY: a4Ayjb7ov-7WMRi8riz594Q_CwzmoAxr6w73484pBl7e
ASSISTANT_URL: https://gateway.watsonplatform.net/assistant/api
resources:
Resources:
ApiGatewayCustomName:
Type: AWS::ApiGateway::DomainName
Properties:
CertificateArn: arn:aws:acm:us-east-1:900637626098:certificate/ec621460-f71d-4a87-9ce2-027206c7f8c4
DomainName: chat.olokinho.ml
ApiMapping:
Type: 'AWS::ApiGateway::BasePathMapping'
DependsOn: [ApiGatewayRestApi]
Properties:
BasePath: ''
DomainName: !Ref ApiGatewayCustomName
RestApiId: !Ref ApiGatewayRestApi
Stage: dev
Route53Api:
Type: AWS::Route53::RecordSetGroup
Properties:
HostedZoneName: olokinho.ml.
Comment: Alias para API Gateway.
RecordSets:
- Name: chat.olokinho.ml.
Type: A
AliasTarget:
EvaluateTargetHealth: false
HostedZoneId: !GetAtt ApiGatewayCustomName.DistributionHostedZoneId
DNSName: !GetAtt ApiGatewayCustomName.DistributionDomainName