CreateHarvestJob
Source:
src/AWS/MediaPackageV2/CreateHarvestJob.ts
Runtime binding for mediapackagev2:CreateHarvestJob.
Exports a clip of previously streamed content from the bound
OriginEndpoint to an S3 bucket as a live-to-VOD asset — e.g. a
Lambda that clips a highlight when an operator flags a moment. The
endpoint must have a startover window covering the requested schedule,
and the destination bucket needs a policy granting the
mediapackagev2.amazonaws.com service principal write access. The
endpoint’s group, channel, and name are injected from the binding.
Provide the implementation with
Effect.provide(AWS.MediaPackageV2.CreateHarvestJobHttp).
Harvesting Live-to-VOD Clips
Section titled “Harvesting Live-to-VOD Clips”// init — bind the operation to the endpointconst createHarvestJob = yield* AWS.MediaPackageV2.CreateHarvestJob(endpoint);
// runtimeconst job = yield* createHarvestJob({ HarvestedManifests: { HlsManifests: [{ ManifestName: "index" }] }, ScheduleConfiguration: { StartTime: new Date(Date.now() - 5 * 60_000), EndTime: new Date(), }, Destination: { S3Destination: { BucketName: "my-clips", DestinationPath: "highlights/" }, },});