Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/utils/merge-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ module.exports = function mergeConfig(baseConfig, srcConfig) {
key=== 'initialText' ||
key=== 'avatarImageUrl' ||
key=== 'toolbarLogo' ||
key=== 'streamingWebSocketEndpoint' ||
key=== 'streamingDynamoDbTable' ||
!isEmpty(srcConfig[key]) ) {
value = (typeof (baseConfig[key]) === 'object') ?
// recursively merge sub-objects in both directions
Expand Down
18 changes: 5 additions & 13 deletions templates/codebuild-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,7 @@ Parameters:
Type: String
Default: ''
Description: >
If not using the Web socket endpoint created via AllowStreamingResponses, you can optionally specify an alternative streaming endpoint here

StreamingDynamoDbTable:
Type: String
Default: ''
Description: >
If not using the DynamoDB table through Lex Web UI, you can optionally specify an alternative table for streaming purposes here
If you have an existing WebSocket API Gateway endpoint, you can specify it using this parameter. This requires parameter AllowStreamingResponses set to True.

ShouldEnableUpload:
Type: String
Expand Down Expand Up @@ -587,8 +581,7 @@ Conditions:
UseDefaultCloudfrontUrl: !Or [ !Equals [!Ref WebAppConfCname, ''], !Equals [!Ref WebAppAcmCertificateArn, ''] ]
ShouldNotSpecifyWafAcl: !Equals [!Ref WebAppWafAclArn, '']
EnableStreaming: !Equals [!Ref AllowStreamingResponses, true]
HasStreamingWebSocketEndpoint: !Not [!Equals [!Ref StreamingWebSocketEndpoint, ""]]
HasStreamingDynamoDbTable: !Not [!Equals [!Ref StreamingDynamoDbTable, ""]]
DeployStreamingStack: !And [!Equals [!Ref AllowStreamingResponses, true], !Equals [!Ref StreamingWebSocketEndpoint, ""]]
EnableUpload: !Equals [!Ref ShouldEnableUpload, true]
NeedsVpc: !And [ !Not [ !Equals [!Ref VpcSubnetId, ''] ], !Not [ !Equals [!Ref VpcSecurityGroupId, ''] ] ]

Expand Down Expand Up @@ -816,7 +809,7 @@ Resources:

StreamingSupport:
Type: AWS::CloudFormation::Stack
Condition: EnableStreaming
Condition: DeployStreamingStack
Properties:
TimeoutInMinutes: 15
TemplateURL: !Sub "https://${SourceBucket}.s3.${AWS::Region}.amazonaws.com/${SourcePrefix}/templates/streaming-support.yaml"
Expand Down Expand Up @@ -980,9 +973,9 @@ Resources:
- Name: ALLOW_STREAMING_RESPONSES
Value: !Ref AllowStreamingResponses
- Name: STREAMING_WEB_SOCKET_ENDPOINT
Value: !If [EnableStreaming, !If [HasStreamingWebSocketEndpoint, !Ref StreamingWebSocketEndpoint, !Sub "wss://${StreamingSupport.Outputs.WebSocketId}.execute-api.${AWS::Region}.amazonaws.com/Prod"], ""]
Value: !If [DeployStreamingStack, !Sub "wss://${StreamingSupport.Outputs.WebSocketId}.execute-api.${AWS::Region}.amazonaws.com/Prod", !If [EnableStreaming, !Ref StreamingWebSocketEndpoint, ""]]
- Name: STREAMING_DYNAMO_TABLE
Value: !If [EnableStreaming, !If [HasStreamingDynamoDbTable, !Ref StreamingDynamoDbTable, !Sub "${StreamingSupport.Outputs.DynamoTableName}"], ""]
Value: !If [DeployStreamingStack, !Sub "${StreamingSupport.Outputs.DynamoTableName}", ""]
- Name: ENABLE_UPLOAD
Value: !Ref ShouldEnableUpload
- Name: UPLOAD_BUCKET_NAME
Expand Down Expand Up @@ -1074,7 +1067,6 @@ Resources:
BotAvatarImgUrl: !Ref BotAvatarImgUrl
AllowStreamingResponses: !Ref AllowStreamingResponses
StreamingWebSocketEndpoint: !Ref StreamingWebSocketEndpoint
StreamingDynamoDbTable: !Ref StreamingDynamoDbTable
ShouldEnableUpload: !Ref ShouldEnableUpload
UploadBucket: !Ref UploadBucket
Timestamp: !Ref Timestamp
Expand Down
10 changes: 1 addition & 9 deletions templates/master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -574,13 +574,7 @@ Parameters:
Type: String
Default: ''
Description: >
If not using the Web socket endpoint created via AllowStreamingResponses, you can optionally specify an alternative streaming endpoint here

StreamingDynamoDbTable:
Type: String
Default: ''
Description: >
If not using the DynamoDB table through Lex Web UI, you can optionally specify an alternative table for streaming purposes here
If you have an existing WebSocket API Gateway endpoint, you can specify it using this parameter. This requires parameter AllowStreamingResponses set to True.

ShouldEnableUpload:
Type: String
Expand Down Expand Up @@ -675,7 +669,6 @@ Metadata:
- retryCountPostTextTimeout
- AllowStreamingResponses
- StreamingWebSocketEndpoint
- StreamingDynamoDbTable
- ShouldEnableUpload
- UploadBucket
- Label:
Expand Down Expand Up @@ -812,7 +805,6 @@ Resources:
SourceBucket: !Ref BootstrapBucket
SourcePrefix: !Ref BootstrapPrefix
StreamingWebSocketEndpoint: !Ref StreamingWebSocketEndpoint
StreamingDynamoDbTable: !Ref StreamingDynamoDbTable
SourceObject: !Sub "${BootstrapPrefix}/src-v0.21.6.zip"
CustomResourceCodeObject: !Sub "${BootstrapPrefix}/custom-resources-v0.21.6.zip"
InitiateChatLambdaCodeObject: !Sub "${BootstrapPrefix}/initiate-chat-lambda-v0.21.6.zip"
Expand Down