This content originally appeared on DEV Community and was authored by Ajit Singh
Let's see how a website deployment work. When we deploy a website on a server then we actually open a port on a server and then do some calculations on the server have some state or DB etc. We process the requests and serve files after processing the request but that is not the case for static files in this we just have to serve files without processing them. So, setting up a server for them is useless. If we can serve these files as required then we are good. This means that we just need storage for our files mapped to the requests and we can also have some dynamic behavior if our files are js files because the browser can process js files so we just send static js files which later on our browser can process.
AWS S3 provides us with this we deploy files in our S3 bucket and serve them statically. We just need to add some way by which we can join it to a web address. There is a setting in S3 which allows us to do just that. This way we need not maintain servers and cost reduces drastically. It can be used to deploy a lot of framework website too like React, Angular, Vue just not the ones that use SSR because they need to process data in the server.
In the next tutorial we will see how to setup static websites on AWS S3.
This content originally appeared on DEV Community and was authored by Ajit Singh
Ajit Singh | Sciencx (2021-07-19T05:59:49+00:00) Hosting static sites in S3. Retrieved from https://www.scien.cx/2021/07/19/hosting-static-sites-in-s3/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.