Hello Everyone,
I’m trying to configure Amazon S3 bucket to use it as a storage for course instructor generated reports, I’ve added my S3 access key and secret key and bucket info in lms.auth.json and cms.auth.json, as seen below:
"AWS_ACCESS_KEY_ID": "my-access-key",
"AWS_QUERYSTRING_AUTH": false,
"AWS_S3_CUSTOM_DOMAIN": "bucket-name.s3.amazonaws.com",
"AWS_SECRET_ACCESS_KEY": "my_sevret_key",
"AWS_STORAGE_BUCKET_NAME": "bucket-name",
and the grade downloads block in lms.env.json and cms.env.json as seen below:
"GRADES_DOWNLOAD": {
"BUCKET": "bucket-name",
"ROOT_PATH": "lms-grades",
"STORAGE_CLASS": "storages.backends.s3boto.S3BotoStorage",
"STORAGE_KWARGS": {
"location": "/tmp/edx-s3/grades"
},
"STORAGE_TYPE": "s3"
},
when i try to generate the reports from the instructor data downloads dashboard, i get the below error:
“”"""""""
Traceback (most recent call last):
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/app/trace.py”, line 240, in trace_task
R = retval = fun(*args, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/celery/app/trace.py”, line 438, in protected_call
return self.run(*args, **kwargs)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks.py”, line 187, in calculate_grades_csv
return run_main_task(entry_id, task_fn, action_name)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks_helper/runner.py”, line 113, in run_main_task
task_progress = task_fcn(entry_id, course_id, task_input, action_name)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py”, line 207, in generate
return CourseGradeReport()._generate(context)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py”, line 222, in _generate
self._upload(context, success_headers, success_rows, error_headers, error_rows)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks_helper/grades.py”, line 277, in _upload
upload_csv_to_report_store([success_headers] + success_rows, ‘grade_report’, context.course_id, date)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/tasks_helper/utils.py”, line 40, in upload_csv_to_report_store
report_store.store_rows(course_id, report_name, rows)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/models.py”, line 279, in store_rows
self.store(course_id, filename, output_buffer)
File “/edx/app/edxapp/edx-platform/lms/djangoapps/instructor_task/models.py”, line 266, in store
self.storage.save(path, buff)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/files/storage.py”, line 54, in save
return self._save(name, content)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/storages/backends/s3boto.py”, line 417, in _save
self._save_content(key, content, headers=headers)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/storages/backends/s3boto.py”, line 428, in _save_content
rewind=True, **kwargs)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/key.py”, line 1293, in set_contents_from_file
chunked_transfer=chunked_transfer, size=size)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/key.py”, line 750, in send_file
chunked_transfer=chunked_transfer, size=size)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/key.py”, line 951, in _send_file_internal
query_args=query_args
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/connection.py”, line 665, in make_request
retry_handler=retry_handler
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/connection.py”, line 1071, in make_request
retry_handler=retry_handler)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/connection.py”, line 940, in _mexe
request.body, request.headers)
File “/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/boto/s3/key.py”, line 884, in sender
response.status, response.reason, body)
S3ResponseError: S3ResponseError: 403 Forbidden
<?xml version="1.0" encoding="UTF-8"?>
AccessDenied
Access Denied82F5667F28D84275QGz8JvykjcDih8mfX+yWLo4j19VyvYcIF5IKIEAK0WuUv2XlzJfLFTWk0fUP0PXUA7hof4wyR90=
“”’’’’’’’’’’’’’’
fetching the reports works fine, but when i try to generate the report i get the above error.
please note iv’e granted the IAM user the “amazons3fullaccess” policy.
I’m using Hawthorn release.
Regards.