ORA: File Upload issue with ap-south-1 S3 Bucket

Hello all,

In ORA we are trying to upload files and getting some errors.

We have configured all necessary settings for s3 bucket and it is working fine with this (profile picture, grade downloads, course import/export) but not with ORA file upload.

Error trace:

2020-07-16 10:16:30,771 ERROR 7386 [openassessment.xblock.submission_mixin] submission_mixin.py:352 - Error retrieving download URL.
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/openassessment/xblock/submission_mixin.py", line 350, in _get_download_url
    return file_upload_api.get_download_url(self._get_student_item_key(file_num))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/openassessment/fileupload/api.py", line 22, in get_download_url
    return backends.get_backend().get_download_url(key)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/openassessment/fileupload/backends/s3.py", line 44, in get_download_url
    raise FileUploadInternalError(ex)
FileUploadInternalError: BotoClientError: When using SigV4, you must specify a 'host' parameter.

open edX release: open-release/hawthorn.master
bucket region: ap-south-1

Getting the same with open-release/ironwood.master

I know that ap-south-1 is using Sigv4 (US regions are using the Sigv2) signing method so I have added host while creating s3 connection. This helped me to pass the above-mentioned error but if I upload a file for ORA then it is saying that you have been logged out. Please see the screenshot below:

Any help with this?

1 Like

ORA file uploads to AWS S3 only works when your ec2 and s3 bucket is located in the us region. I found out the hard way after migrating from the eu-west region.

Hi @nabeelmerchant1,

Thanks for your response.

Yes, this is a painful thing. But we have to keep our buckets in the ap-south-1 region and to achieve this we have made the following changes:

Boto side:


open-edx side:
add AWS_S3_HOST in common.py

AWS_S3_HOST = 's3.ap-south-1.amazonaws.com'

ORA side:

1 Like