Skip to content

GetIngestionJob

Source: src/AWS/Bedrock/GetIngestionJob.ts

Runtime binding for bedrock-agent:GetIngestionJob — read the status and statistics of an ingestion job started on the bound DataSource.

The binding grants the function bedrock:GetIngestionJob scoped to the data source’s parent knowledge base.

// init
const getIngestionJob = yield* Bedrock.GetIngestionJob(dataSource);
// runtime
const { ingestionJob } = yield* getIngestionJob({
ingestionJobId: jobId,
}).pipe(
Effect.repeat({
schedule: Schedule.spaced("5 seconds"),
until: (r) =>
r.ingestionJob.status === "COMPLETE" ||
r.ingestionJob.status === "FAILED",
times: 36,
}),
);