StartTextTranslationJob
Source:
src/AWS/Translate/StartTextTranslationJob.ts
Runtime binding for translate:StartTextTranslationJob — start an
asynchronous batch translation job over a collection of documents in S3.
The binding is constructed with the data-access role (the IAM role
Amazon Translate assumes to read the input documents and write results;
its trust policy must allow translate.amazonaws.com). The role’s ARN is
injected as DataAccessRoleArn on every runtime request and the host is
granted iam:PassRole on it alongside
translate:StartTextTranslationJob (which has no resource-level IAM).
Track the job with DescribeTextTranslationJob and stop it with
StopTextTranslationJob.
Batch Translation Jobs
Section titled “Batch Translation Jobs”// deploy time — bind the Translate data-access roleconst startJob = yield* AWS.Translate.StartTextTranslationJob(dataAccessRole);
// runtimeconst job = yield* startJob({ InputDataConfig: { S3Uri: "s3://my-bucket/input/", ContentType: "text/plain" }, OutputDataConfig: { S3Uri: "s3://my-bucket/output/" }, SourceLanguageCode: "en", TargetLanguageCodes: ["es"],});// job.JobId, job.JobStatus === "SUBMITTED"