- Newest
- Most votes
- Most comments
Hi, this issues seems to happen to others: https://github.com/aws-amplify/amplify-js/issues/9773 This ticket proposes a solution (see toward the end) that you may try in your case
Thanks for the response. I reviewed the post and it is specific to React and the user has defined his own methods for upload. I am using Django's built in save function and tested that it worked prior to deploying to a live env. That leads me to believe there is some sort of hangup outside of my code.
Thanks to your post, I realized that it should be a problem in Vercel, not Django. (Before that my google key word was always "Django + error message"). Then I find this article: https://vercel.com/guides/how-can-i-use-aws-s3-with-vercel It says we should first configure the env variables in project settings on the Vercel dashboard. I added AWS credentials and region, redeployed it (this is important!) , and, it finally works. I hope this can help you a little bit.
Relevant content
- AWS OFFICIALUpdated 3 months ago
I'm getting exactly the same problem as you. Also using Django & React & Vercel. It's strange that it works in localhost, but fails on vercel. I've also spent one day on this issue.
I am experiencing the same issue while hosting my Django web application on Vercel with media files stored in an S3 bucket. Despite setting up the bucket policy and IAM user keys correctly, everything works fine on localhost, but I get the InvalidToken error when trying to upload files on Vercel.