Skip to content

DataSource

Source: src/AWS/Kendra/DataSource.ts

An Amazon Kendra data source — a connector that syncs documents from a repository (S3 bucket, SharePoint, website, …) into a Kendra index.

S3 Data Source

import * as AWS from "alchemy/AWS";
const source = yield* AWS.Kendra.DataSource("Docs", {
indexId: index.id,
type: "S3",
roleArn: dataSourceRole.roleArn,
configuration: {
S3Configuration: {
BucketName: bucket.bucketName,
},
},
});

Scheduled Sync

const source = yield* AWS.Kendra.DataSource("Docs", {
indexId: index.id,
type: "S3",
roleArn: dataSourceRole.roleArn,
schedule: "cron(0 12 * * ? *)",
configuration: {
S3Configuration: { BucketName: bucket.bucketName },
},
});