# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. --- AWSTemplateFormatVersion: "2010-09-09" Description: Amazon Transcribe Live Call Analytics with Agent Assist - Amazon Kendra index Parameters: IndexName: Type: String IndexEdition: Type: String Default: DEVELOPER_EDITION AllowedValues: - DEVELOPER_EDITION - ENTERPRISE_EDITION Resources: KendraIndexRole: Type: 'AWS::IAM::Role' Properties: AssumeRolePolicyDocument: Version: 2012-10-17 Statement: - Sid: '' Effect: Allow Principal: Service: kendra.amazonaws.com Action: 'sts:AssumeRole' Policies: - PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Resource: '*' Condition: StringEquals: 'cloudwatch:namespace': 'Kendra' Action: - 'cloudwatch:PutMetricData' - Effect: Allow Resource: '*' Action: 'logs:DescribeLogGroups' - Effect: Allow Resource: !Sub - 'arn:aws:logs:${region}:${account}:log-group:/aws/kendra/*' - region: !Ref 'AWS::Region' account: !Ref 'AWS::AccountId' Action: 'logs:CreateLogGroup' - Effect: Allow Resource: !Sub - 'arn:aws:logs:${region}:${account}:log-group:/aws/kendra/*:log-stream:*' - region: !Ref 'AWS::Region' account: !Ref 'AWS::AccountId' Action: - 'logs:DescribeLogStreams' - 'logs:CreateLogStream' - 'logs:PutLogEvents' PolicyName: KendraMediaIndexPolicy KendraIndex: Type: 'AWS::Kendra::Index' Properties: Name: !Ref IndexName Edition: !Ref IndexEdition RoleArn: !GetAtt KendraIndexRole.Arn Outputs: KendraIndexId: Description: LCA User Interface URL Value: !GetAtt KendraIndex.Id