I am trying to deliver hls media from a lambda function using nodejs to an AWS MediaPackage input endpoint. I am doing the following and seems to be pushing the media file chunks (ts files):
const auth = 'Basic ' + Buffer.from(endpoints[0].Username + ':' + endpoints[0].Password).toString('base64');
const options = {
hostname: endpoints[0].Url.hostname,
path: endpoints[0].Url.path,
headers: {
'Content-Type': 'application/json',
'Authorization': auth,
'Content-Length': Buffer.byteLength(data.Body)
},
body: data.Body // body of ts file
};
console.log(options);
const res = await httpsPut(options); //Promise using https put to send the body in options
However, I don't see any logs in CloudWatch to the MediaPackage Channel
Is this the right way to send inject media to MediaPackage? I couldn't find any documentation
Thanks,