Deploying to AWS using S3 and CloudFront
Amazon S3 is a static storage offering that can be used as a host for static files, such as what is generated by the Vue CLI’s build
script.
CloudFront is AWS’s Content Delivery Network (CDN) offering. A CDN can improve a web application’s performance by serving static content from an edge location. These servers are positioned around the world and are more likely to be geographically located close to the end user than the origin servers (the ones that serve the content). The edge servers in a CDN request resources from the origin if they don’t have them cached but will serve subsequent requests.
Let’s learn how to configure S3 to host a Vue.js application (to do this, make sure that you have an AWS account):
- Start by creating and configuring an S3 bucket.
To do this, head to the S3 product page. It will look similar to the following:
Figure 13.33 – Selecting...