Skip to content

StartTransformerJob

Source: src/AWS/B2BI/StartTransformerJob.ts

Runtime binding for b2bi:StartTransformerJob.

Runs an asynchronous transformer job against an EDI document in S3 — the bound Transformer (which must be active) parses and maps the inputFile and writes the result to outputLocation. Poll the returned transformerJobId with GetTransformerJob. B2BI accesses the S3 locations with its service principal, so the buckets need a bucket policy granting b2bi.amazonaws.com read/write access. Provide the implementation with Effect.provide(AWS.B2BI.StartTransformerJobHttp).

// init — grants b2bi:StartTransformerJob on the transformer
const startTransformerJob = yield* AWS.B2BI.StartTransformerJob(transformer);
// runtime
const { transformerJobId } = yield* startTransformerJob({
inputFile: { bucketName: "my-edi-bucket", key: "inbound/order.edi" },
outputLocation: { bucketName: "my-edi-bucket", key: "output/" },
});