The following examples demonstrate creating an Amazon S3 data source. The examples assume that you have already created an index and an IAM role with permission to read the data from the index. For more information about the IAM role, see IAM access roles. For more information about creating an index, see Creating an index.
aws kendra create-data-source \ --index-id
index ID
\ --name example-data-source \ --type S3 \ --configuration '{"S3Configuration":{"BucketName":"bucket name
"}}' --role-arn 'arn:aws:iam::account id
:role:/role name
It can take some time to create your data source. You can monitor the progress by
using the DescribeDataSource API. When the data source status is ACTIVE
the data source is ready to use.
The following examples demonstrate getting the status of a data source.
aws kendra describe-data-source \ --index-id
index ID
\ --iddata source ID
This data source doesn't have a schedule, so it doesn't run automatically. To index the data source, you call StartDataSourceSyncJob to synchronize the index with the data source.
The following examples demonstrate synchronizing a data source.
aws kendra start-data-source-sync-job \ --index-id
index ID
\ --iddata source ID