VIDEO UPLOAD TO BUCKET S3 signature

20 views
Skip to first unread message

Lucas Rittié

unread,
Jun 25, 2019, 9:27:45 AM6/25/19
to General Open edX discussion
Hello,

I'm trying to set up the video upload pipeline to upload videos to my bucket s3.


I have configured the auth and env jsons and I can see the new menu in studio "Content --> VideoUpload"

Yet I can't upload videos to the S3, the video starts to upload then get in 'upload failed' status.

I get the following error message : The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.

2019-06-25 13:17:28,251 INFO 1539 [edxval.models] [user 9] models.py:678 - VAL: Video created with id [0e6fa0d6-8c09-4f04-92a0-ed8b5e5d416a] and status [upload]
2019-06-25 13:17:29,012 INFO 1539 [edxval.models] [user 9] models.py:680 - VAL: Status changed to [s3_upload_failed] for video [0e6fa0d6-8c09-4f04-92a0-ed8b5e5d416a]
2019-06-25 13:17:29,013 INFO 1539 [contentstore.views.videos] [user 9] videos.py:804 - VIDEOS: Video status update with id [0e6fa0d6-8c09-4f04-92a0-ed8b5e5d416a], status [s3_upload_failed] and message [The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.]

Has something already encounter this issue ? I couldn't find a related post on this group.
Do you know how to change the encryption algorythm used to create a request compliant to aws bucket expectation ?

Best regards,
Lucas


Lucas Rittié

unread,
Jun 26, 2019, 10:35:12 AM6/26/19
to General Open edX discussion
I added the following lines to the code edx-platform/cms/djangoapps/contentstore/views/videos.py in order to use awsv4 signature.

if not boto.config.get('s3', 'use-sigv4'):
        boto.config.add_section('s3')
        boto.config.set('s3', 'use-sigv4', 'True')

But I still can't upload content to the bucket even tough I can access it as I can list all the bucket dir.

The PUT request to the url below is causing this error :


The logs are not very talkative :


Your file could not be uploaded

This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.


2019-06-26 14:29:23,121 INFO 5428 [contentstore.views.videos] [user 9] videos.py:823 - VIDEOS: Video status update with id [4bf257ef-7897-4162-9b1d-329ab041d355], status [upload_failed] and message [This may be happening because of an error with our server or your internet connection. Try refreshing the page or making sure you are online.]

Any idea what's causing this issue ? If someone has encountered this issue before can you share your solution ?

Thanks in advance,
Lucas
Reply all
Reply to author
Forward
0 new messages