How Can I Display My Photos Stored in an S3 Bucket Using JavaScript?
Asked by
ShutterBug47
I'm an amateur photographer with hundreds of photos in albums that I'd love to showcase using a JavaScript application hosted on AWS. The images will be stored in an S3 bucket. Does anyone have suggestions for an existing project I can use? If not, could you recommend some libraries or packages that could help me build my own app? I have basic knowledge of JavaScript, including some jQuery, MUI, and React.
Answers
Check out this guide on creating signed URLs for AWS S3 objects with Node.js. Itโs a great starting point for accessing private assets! [Link](https://medium.com/@nurulislamrimon/how-to-generate-signed-urls-for-aws-s3-objects-using-node-js-visit-private-assets-3477d84e11da). Have fun!
Reply to this answer
One option is to set up your S3 bucket to host a static website. Youโll create a standard site and use your S3 public URLs for the image sources. Hereโs the AWS documentation that explains it: [AWS S3 Website Hosting](https://docs.aws.amazon.com/AmazonS3/latest/userguide/WebsiteHosting.html).
Reply to this answer
Add your answer
Answers are reviewed before publication.
ShutterBug47: Thanks for the tip! Iโll look into that.
WebDevGuru88: Make sure to set up a CloudFront distribution to help keep your bucket secure and less public. It can also save you some costs!