- Newest
- Most votes
- Most comments
Hello.
You can synchronize to a data source in code using the start_ingestion_job() API.
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent/client/start_ingestion_job.html
https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-ds-manage.html#kb-ds-update
For example, I think you can synchronize by creating the following code in Lambda.
import boto3
client = boto3.client('bedrock-agent')
def lambda_handler(event, context):
response = client.start_ingestion_job(
knowledgeBaseId='knowledgeBaseId',
dataSourceId='dataSourceId'
)
Hi,
You have then multiple ways to trigger the codef proposed by Riku as a Lambda function at midnight every day: for example, Eventbridge Scheduler at https://aws.amazon.com/eventbridge/scheduler/
This function will start the job but not monitor it.
If you want to monitor job execution (and retry it when needed), you may prefer AWS Batch scheduling where jobs can last more than the max 15 min of a Lambda. See https://docs.aws.amazon.com/batch/latest/userguide/job_scheduling.html
Best,
Didier
Relevant content
- asked a year ago
- asked a month ago
- asked 10 months ago
- asked 9 months ago
- AWS OFFICIALUpdated 7 months ago