Closed
Description
Describe the bug
I am using the below package to create the harvest job. But facing error when executing the code from the lambda (Runtime: Node.js 20.x).
Package: @aws-sdk/client-mediapackagev2
version: "3.682.0"
Error: GetHarvestJobCommand is not a constructor
Typescript code snippet used.
import {
MediaPackageV2Client,
CreateHarvestJobCommand,
CreateHarvestJobCommandOutput,
GetHarvestJobResponse,
GetHarvestJobCommand,
} from '@aws-sdk/client-mediapackagev2';
const mediapackageClient = new MediaPackageV2Client({ region: process.env.REGION });
const input = {
ChannelGroupName: channelGroupName,
ChannelName: channelName,
OriginEndpointName: originEndpointName,
Description: description,
HarvestedManifests: {
HlsManifests: [
{
ManifestName: manifestName,
},
],
},
ScheduleConfiguration: {
StartTime: new Date(Number(start) * 1000),
EndTime: new Date(Number(end) * 1000),
},
Destination: {
S3Destination: {
BucketName: bucket,
DestinationPath: manifest,
},
},
ClientToken: UUID,
HarvestJobName: UUID,
};
const createHarvestJobCommand = new CreateHarvestJobCommand(input);
const createHarvestResponse: CreateHarvestJobCommandOutput =
await mediapackageClient.send(createHarvestJobCommand);
Regression Issue
- Select this option if this issue appears to be a regression.
Expected Behavior
It should create harves job in EMPV2
Current Behavior
Throwing error 'GetHarvestJobCommand is not a constructor' , when using the Package: @aws-sdk/client-mediapackagev2
version: "3.682.0"
Reproduction Steps
Create the above code snippet in typescript and deploy that to a lambda with runtime Node.js 20.x - it will throw the error
Possible Solution
No response
Additional Information/Context
No response
SDK version used
3.682.0
Environment details (OS name and version, etc.)
Lambda: Runtime Node.js 20.x, Architecture x86_64