I have a video stored in aws s3 bucket I want to get the metadata of the video (like framerate, resolution, etc) inside aws lambda which is using node js runtime.
It will be better if this can be done in memory instead of downloading the whole video in lambda temp memory
You can fetch metadata of your video via the headObject operation.
This is done without downloading the actual content of the video.
Edit: You're right, this doesn't help you. Extracting actual technical metadata of videos seems to be non-trivial. There's a good example on the AWS blog where they extract metadata via MediaInfo on lambda.
MediaInfo supports natively AWS, without having to download the file in a first step. MediaInfo downloads in RAM what it needs for the analysis, and does itself the seek requests when needed.
URL style is https://AWSKey:AWSSecret@s3....
Using pre-signed URLs is also possible but the 20.03 version is buggy, you need to use MediaInfo snapshots.
Jérôme, developer of MediaInfo.