AWS::Kendra::DataSource HookConfiguration - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AWS::Kendra::DataSource HookConfiguration

Provides the configuration information for invoking a Lambda function in Amazon Lambda to alter document metadata and content when ingesting documents into Amazon Kendra. You can configure your Lambda function using PreExtractionHookConfiguration if you want to apply advanced alterations on the original or raw documents. If you want to apply advanced alterations on the Amazon Kendra structured documents, you must configure your Lambda function using PostExtractionHookConfiguration. You can only invoke one Lambda function. However, this function can invoke other functions it requires.

For more information, see Customizing document metadata during the ingestion process.


To declare this entity in your Amazon CloudFormation template, use the following syntax:



The condition used for when a Lambda function should be invoked.

For example, you can specify a condition that if there are empty date-time values, then Amazon Kendra should invoke a function that inserts the current date-time.

Required: No

Type: DocumentAttributeCondition

Update requires: No interruption


The Amazon Resource Name (ARN) of an IAM role with permission to run a Lambda function during ingestion. For more information, see an IAM roles for Amazon Kendra.

Required: Yes

Type: String

Minimum: 1

Maximum: 2048

Update requires: No interruption


Stores the original, raw documents or the structured, parsed documents before and after altering them. For more information, see Data contracts for Lambda functions.

Required: Yes

Type: String

Pattern: [a-z0-9][\.\-a-z0-9]{1,61}[a-z0-9]

Minimum: 3

Maximum: 63

Update requires: No interruption