New images from s3 bucket not displaying on website

0

I'm currently working on a website that has been passed down to me from previous developers. The website allows users to upload profile photos, which are then displayed on their profiles. While the functionality worked in the past, I am encountering issues with uploading new photos.

When attempting to upload a new photo through the website's upload form, the form crashes. Similarly, if I upload directly to the S3 bucket, the image does not display on the website. I suspect that there may be a misconfiguration related to the bucket, such as the website attempting to upload to a bucket that does not exist or is inaccessible.

I have verified that there is only one bucket on my end, but I am unsure where the previous developers obtained the URL for uploading to the bucket or pulling images from it. As I am relatively new to website development, I apologize if I have not provided enough information. Any guidance on how to resolve this issue would be greatly appreciated.

asked 2 months ago306 views
1 Answer
0

Hello.

Could you please tell me more about the configuration of the S3 bucket?
What settings are made in the bucket policy for the S3 bucket?
Also, is the block public access setting disabled in S3?
https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucket-policies.html
https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-control-block-public-access.html

Is your website distributed using CloudFront?
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html

If you are distributing from CloudFront, please try deleting the cache by following the steps in the document below.
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html

Also, are there any errors displayed when uploading files?
In the first place, isn't there a website that uses not only S3 but also EC2 and dynamic content (PHP, etc.)?

profile picture
EXPERT
answered 2 months ago
  • Hi, Thank you for your reply. The bucket is public on us-east-2, with versioning disabled. There seems to be no bucket policy, so I believe it is unlikely that it uses CloudFront. There aren't any errors displayed when uploading directly to the bucket. Users get a 500 error through the website. The website itself only uses AWS for that specific bucket, everything else is from other sources.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions