0

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:

errors

4
  • are you retrieve normal files link or presigned url and show me the settings.py Commented May 20, 2020 at 4:36
  • Are you wanting these files to be accessible to anyone on the Internet at any time? I notice that you are using a Signed URL. Is this intentional? How is the HTML page being generated? Commented May 20, 2020 at 4:49
  • bro html pages are on local machine..and css,js and images are in the bucket which i made pubic @John Rotenstein Commented May 20, 2020 at 4:56
  • bro i dont understand what exactly you are saying..can u explain clearly plz@giveJob Commented May 20, 2020 at 4:58

1 Answer 1

1

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:

The 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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.