Steps to upload file with OpenAssessment to Amazon AWS

71 views
Skip to first unread message

Christos Bellos

unread,
Oct 13, 2016, 7:32:21 AM10/13/16
to General Open edX discussion
Hi, I am trying to set up the OpenAssessment on the AWS Instance that I initiated. 
but for the "FILE_UPLOAD_STORAGE_BUCKET_NAME" I have used the default edxuploads.

I entered then the AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY to the lms.auth.json and the cms.auth.json, but when I try to upload a file, I get the following error at the inspect element of my browser: Permission Denied



















I have checked multiple the credentials and I am sure I entered them correctly. 
Also, I tried to create a new bucket to replace the default edxuploads, but still the same error.

Could you please help me on this?

Christos Bellos

unread,
Oct 25, 2016, 4:23:34 AM10/25/16
to General Open edX discussion
For the file upload to S3, I created a new bucket and added the following CORS configuration:

    <?xml version="1.0" encoding="UTF-8"?>
    <CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
        <CORSRule>
            <AllowedOrigin>*</AllowedOrigin>
            <AllowedMethod>GET</AllowedMethod>
            <AllowedMethod>POST</AllowedMethod>
            <AllowedMethod>PUT</AllowedMethod>
            <AllowedMethod>HEAD</AllowedMethod>
            <AllowedHeader>*</AllowedHeader>
        </CORSRule>
    </CORSConfiguration>

However, I still get these 2 errors in my log file: 

>     > 2016-10-25 04:14:47,833 ERROR 4566 [openassessment.fileupload.api] s3.py:41 - An internal exception occurred while generating a download URL.
>     > Traceback (most recent call last):
>     >   File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/openassessment/fileupload/backends/s3.py", line 36, in get_download_url
>     >     bucket = conn.get_bucket(bucket_name)
>     >   File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/boto/s3/connection.py", line 503, in get_bucket
>     >     return self.head_bucket(bucket_name, headers=headers)
>     >   File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/boto/s3/connection.py", line 550, in head_bucket
>     >     response.status, response.reason, body)
>     > S3ResponseError: S3ResponseError: 400 Bad Request

>     2016-10-25 04:14:47,834 ERROR 4566 [openassessment.xblock.submission_mixin] submission_mixin.py:270 - Error retrieving download URL.
>     Traceback (most recent call last):
>       File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/openassessment/xblock/submission_mixin.py", line 268, in _get_download_url
>         return file_upload_api.get_download_url(self._get_student_item_key())
>       File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/openassessment/fileupload/api.py", line 20, in get_download_url
>         return backends.get_backend().get_download_url(key)
>       File "/opt/bitnami/apps/edx/edx-platform/venv/lib/python2.7/site-packages/openassessment/fileupload/backends/s3.py", line 43, in get_download_url
>         raise FileUploadInternalError(ex)
>     FileUploadInternalError: S3ResponseError: 400 Bad Request

Could you please help me on this? I do not have other alternatives or thoughts...
Reply all
Reply to author
Forward
0 new messages