Reputation: 1
I have hosted my static files on Amazon bucket and configured them in settings but still they are not loading when I run the server and throwing the error as shown in the image:
Upvotes: 0
Views: 1415
Reputation: 269151
Objects in Amazon S3 are private by default.
If you wish for your objects to be accessible, you will need to use one of these methods:
public-read
permissions to the individual objects, orThe screenshot you provided shows URLs that in the format of a pre-signed URL. This is either because your application generated the pre-signed URL, or because you copied a link from within the Amazon S3 management console. These URLs expire after a given time period, which is ideal for security if you are providing temporary access to a private object.
However, if your intention is that these files should be accessible to anyone at any time, you should attach a Bucket Policy to the Amazon S3 bucket.
See also: Hosting a static website on Amazon S3
Upvotes: 1