I’m considering uploading my css and .js files to an AWS s3 bucket while my dynamic website is hosted on a generic shared hosting. I understand that S3 incurs cost per request or GET. I’m guess accessing those CSS and .js files will count as requests when users browse through my website. Is my understanding wrong?
The cost on this is so low it's practically free (and in fact they have a free tier). I think for
GETrequests it's like $0.0004 USD per 1,000 requests, so you'd have to have 10,000 requests to even hit $4/month. The free tier includes 20,000 requests.If you throw a CDN around your S3 bucket, it can help cut down on costs and make your responses for those assets return more quickly. Cloudflare's free tier is great for this and is what I use for all my static assets.
Thanks @m12y ! at the majority advice from indiehackers peeps I went with cloudfront instead of cloudflare. I’m glad im still in testing phase with bill alerts so i will also test cloudflare and see if things improves. I can’t say enough how much i love that I found everyone here in indiehackers
Thanks for all the feedback. So no to css and js files for me. Further more I’m working on a music streaming platform. example: there are 10,000 album pictures for users to browse therefore every time 1 user logs in to my platform basically 10,000 album pictures are requested from s3 bucket just so the user can see them. I don't want that. I now realize this so i will be hosting all album pictures on my hosting server and let song uploads go to s3 bucket. Hopefully audio only loads a request from s3 bucket when user intentionally press the play button (to stream the music) on an album.
.
S3 charges for outgoing costs (incoming is generally free), for each request and for the storage itself. you can see it here https://aws.amazon.com/s3/pricing/
Thanks, got it!
anything sent (or requested) to/from aws is going to be billed... that's how they make that money!
there are a lot of startup / accelerator discounts and credits going around though...
Thanks!