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.
Top comments (0)