Skip to content

CreateJob

Source: src/AWS/S3Control/CreateJob.ts

Runtime binding for s3:CreateJob (S3 Batch Operations).

Submits a large-scale batch job — copy, tag, ACL, restore, or Lambda-invoke — over a manifest of S3 objects, e.g. an ingest Lambda that kicks off a bulk re-tagging run. The binding also grants iam:PassRole so the function can hand the service the job’s execution role. The account id is resolved once via sts:GetCallerIdentity. Provide the implementation with Effect.provide(AWS.S3Control.CreateJobHttp).

// init — account-level binding, no resource argument
const createJob = yield* AWS.S3Control.CreateJob();
// runtime
const { JobId } = yield* createJob({
ConfirmationRequired: true,
Priority: 1,
RoleArn: batchRoleArn,
Operation: { S3PutObjectTagging: { TagSet: [{ Key: "swept", Value: "true" }] } },
Report: { Enabled: false },
ClientRequestToken: token,
ManifestGenerator: {
S3JobManifestGenerator: {
SourceBucket: bucketArn,
EnableManifestOutput: false,
},
},
});