I have a backend running on an EC2 instance using Node.js and MongoDB. I'm wondering if it's possible to host the frontend of my todo app on an S3 bucket. Is that a viable solution?
4 Answers
It really depends on your specifics. If you're thinking of 'using an S3 bucket' just to serve files, then sure, that works for static content. Node.js needs a proper execution environment, though, so while you can store files in S3, you still need your EC2 instance for executing your app. Many people utilize S3+CloudFront for static sites since it's popular and efficient. Just let us know what your end goal is and we can dive deeper!
Yes, you can definitely use S3 for your static assets. It's perfect for storing files that your app can fetch. Plus, combining S3 with CloudFront can help you serve that content efficiently while keeping your S3 bucket hidden from direct public access. They work really well together!
You can technically host a static site directly from S3, but if you're looking to use a custom domain with HTTPS, I'd suggest incorporating CloudFront with S3. This setup is definitely the way to go if you plan on showcasing your website to others!
Absolutely! S3 is a great choice for serving static frontends, meaning those that don’t require server-side rendering. You might also want to consider using CloudFront alongside S3 for added benefits like edge caching, which can really speed things up for your users.
That's great to hear! So with that setup, will the content update automatically if I perform CRUD operations?