Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vod-workflow-dev-get_videos #7

Open
slattouf95 opened this issue Jun 15, 2020 · 2 comments
Open

vod-workflow-dev-get_videos #7

slattouf95 opened this issue Jun 15, 2020 · 2 comments

Comments

@slattouf95
Copy link

slattouf95 commented Jun 15, 2020

Hi,

Thank you for the robust workflow setup. All of curl methods are working properly except get video by id, returns an internal server error. I have checked the API gateway error and apparently the get video by id throws an Execution failed due to configuration error: Malformed Lambda proxy response. My guess is that it has to do with the format of my Lambda function's response to the API. I'd highly appreciate it if you have any tips.

Thanks!

@slattouf95
Copy link
Author

After further debugging I have notived that the API get_video by id only throws an error when the transcoding status is "Ready" so the failure is caused from the conditional if the item is "Ready" ``` if item['status'] == "Ready": content = {} content['mp4'] = generate_cf_presigned_url(vid + '/' + vid + '.mp4') content['thumbnails'] = [] response = s3.list_objects( Bucket=get_config("videos", "outputBucket"), Prefix=vid + '/thumbnails' ) for object in response['Contents']: content['thumbnails'].append(generate_cf_presigned_url(object['Key'])) content['hls'] = {} response = s3.list_objects( Bucket=get_config("videos", "outputBucket"), Prefix=vid + '/hls1' ) for object in response['Contents']: if object['Key'].endswith(".m3u8"): filename = object['Key'].split('/')[-1] if filename.startswith("master_"): content['hls'][filename] = generate_cf_presigned_url(object['Key']) item['content'] = content

@pierrejoye
Copy link

Some method names changed since then (or bug ;)

On https://github.com/trackit/aws-workflow-video-on-demand/blob/master/misc.py#L71

Change:
if "generate_cloudfront_presigned_urls" in func['FunctionName']:
to
if "generate_presigned_urls" in func['FunctionName']:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants