-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtemplate.yml
91 lines (86 loc) · 2.38 KB
/
template.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Resources:
# DynamoDbDatabase:
# Type: AWS::Serverless::SimpleTable
InputValidatorAPI:
Type: AWS::Serverless::Api
Properties:
StageName: Prod
DefinitionBody:
'Fn::Transform':
Name: 'AWS::Include'
Parameters:
Location: s3://cc-chatbot-niknar/swagger.yaml
LF0:
Type: AWS::Serverless::Function
Properties:
Runtime: nodejs10.x
CodeUri: ./lambda-functions
Handler: lex_input_validator.handler
Events:
ValidateInputAPI:
Type: Api
Properties:
RestApiId: !Ref InputValidatorAPI
Path: /chatbot
Method: post
Policies:
- AmazonLexRunBotsOnly
- CloudWatchLogsFullAccess
# Logic will be changed
LF1:
Type: AWS::Serverless::Function
Properties:
Runtime: python3.7
CodeUri: ./lambda-functions
Handler: lex_response_handler.lambda_handler
Policies:
- AmazonSQSFullAccess
# Logic will be changed
LF2:
Type: AWS::Serverless::Function
Properties:
Runtime: nodejs10.x
CodeUri: ./lambda-functions
Handler: send_notifications.handler
Events:
CloudwatchCronEvent:
Type: Schedule
Properties:
Schedule: rate(1 minute)
Policies:
- CloudWatchLogsFullAccess
- AmazonSNSFullAccess
- AmazonDynamoDBReadOnlyAccess
- AmazonSQSFullAccess
# Sample for SQS, to be changed
SQSQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: "SQSQueue"
# Sample for Elasticsearch, to be changed
# ElasticSearchInstance:
# Type: AWS::Elasticsearch::Domain
# Properties:
# DomainName: "test"
# ElasticsearchClusterConfig:
# DedicatedMasterEnabled: "true"
# InstanceCount: "2"
# ZoneAwarenessEnabled: "true"
# InstanceType: "m3.medium.elasticsearch"
# DedicatedMasterType: "m3.medium.elasticsearch"
# DedicatedMasterCount: "3"
# EBSOptions:
# EBSEnabled: true
# Iops: 0
# VolumeSize: 20
# VolumeType: "gp2"
# SnapshotOptions:
# AutomatedSnapshotStartHour: "0"
Globals:
Api:
Cors:
AllowMethods: "'*'"
AllowHeaders: "'*'"
AllowOrigin: "'*'"