Skip to content

StartExpenseAnalysis

Source: src/AWS/Textract/StartExpenseAnalysis.ts

Runtime binding for textract:StartExpenseAnalysis — start an asynchronous invoice/receipt analysis job for a document stored in S3. Poll the returned JobId with GetExpenseAnalysis. The caller needs s3:GetObject on the input bucket.

// init
const startExpenseAnalysis = yield* AWS.Textract.StartExpenseAnalysis();
// runtime
const { JobId } = yield* startExpenseAnalysis({
DocumentLocation: { S3Object: { Bucket: bucketName, Name: "invoice.pdf" } },
});