Fix permissions on S3 storage

Priority: Low
Request: I get 403 http status on S3 storage, here is an example
https://besocialyyc-19770.s3.amazonaws.com/media/workout/test/sample/testVideo.mp4
Project ID: besocialyyc-19770
Project Link: https://besocialyyc-19770.botics.co/

1 Like

Hi @radac, thanks for writing in!

The linked file seems to be missing from the bucket.

Hmm, this is very strange. I have just deployed now and added a new file with following URL.
https://besocialyyc-19770.s3.amazonaws.com/media/workout/personal/training-1/testVideo.mp4

Same problem, can you check if file is there?

I have tested on my local machine / personal bucket and it worked.
Checked server logs in dashboard, I see the POST request but no errors.
File is there in django admin, storage didn’t throw any error.

Can you advise me what to check?

P.S. Note that on this project you have enabled mediaconvert, and you have sent me another 2 buckets for IN/OUT with different env var names, does this affect? I’m still using AWS_STORAGE_BUCKET_NAME, you have added AWS_MEDIACONVERT_BUCKET_INPUT and AWS_MEDIACONVERT_BUCKET_OUTPUT

@radac

Same problem, can you check if file is there?

This time the file is there, but the public-read permission is absent. You might want to check this thread - Getting Access Denied on S3 storage

I’m still using AWS_STORAGE_BUCKET_NAME

It’s up to you which bucket to use. The conversion queue is set up to access files inside AWS_MEDIACONVERT_BUCKET_INPUT and upload transcoded versions to AWS_MEDIACONVERT_BUCKET_OUTPUT, so if any files are required to be transcoded you might want to upload them to the appropriate bucket and generate links to the transcoded versions from the output bucket (or copy the files to the media bucket).