InvokeDataAutomationAsync
Source:
src/AWS/BedrockDataAutomation/InvokeDataAutomationAsync.ts
Runtime binding for the InvokeDataAutomationAsync operation (IAM action
bedrock:InvokeDataAutomationAsync on the project ARN + the account’s
data automation profiles) — start an asynchronous Bedrock Data Automation
job against the bound project from a deployed Function.
The binding is constructed with the target DataAutomationProject;
its ARN and stage are injected into every runtime request as
dataAutomationConfiguration. The caller supplies the S3 input/output
locations and the cross-region data automation profile ARN (e.g.
arn:aws:bedrock:us-west-2:{account}:data-automation-profile/us.data-automation-v1).
The calling role also needs s3:GetObject on the input and s3:PutObject
on the output location — Bedrock Data Automation accesses S3 with the
caller’s permissions. Provide the implementation with
Effect.provide(AWS.BedrockDataAutomation.InvokeDataAutomationAsyncHttp).
Invoking Data Automation
Section titled “Invoking Data Automation”Start An Async Job For An Uploaded Document
// deploy time — bind the projectconst invokeAsync = yield* AWS.BedrockDataAutomation.InvokeDataAutomationAsync(project);
// runtime — process a document already in S3const { invocationArn } = yield* invokeAsync({ inputConfiguration: { s3Uri: `s3://${bucket}/uploads/invoice.pdf` }, outputConfiguration: { s3Uri: `s3://${bucket}/results/` }, dataAutomationProfileArn: profileArn,});Get Notified Via EventBridge When The Job Settles
yield* invokeAsync({ inputConfiguration: { s3Uri: input }, outputConfiguration: { s3Uri: output }, dataAutomationProfileArn: profileArn, notificationConfiguration: { eventBridgeConfiguration: { eventBridgeEnabled: true }, },});// pair with AWS.BedrockDataAutomation.consumeDataAutomationJobEvents