1. Creating a React App
i. Open Terminal and check that node.js is installed or not by using node -v.
ii. Create React App by using Command npm create vite@latest to install the required components in the user specified folder.
iii. In Terminal run npm run dev to host the static website.
iv. And while the static webpage is hosting in terminal use command npm run build to create the dist folder.
2. Create S3
i. Once the Bucket is created then try to enable the Static Web Hosting in Properties.
ii. In S3 Bucket try to upload the dist folder on to it.
iii. Set the index.html in Static web hosting and try to run the url to get the webpage at any endpoints.
Url: http://arset.s3-website.ap-south-1.amazonaws.com/
3. CloudFront
i. Create CloudFront and choose the S3 orgin and commit changes to create a Distribution.
ii. Once the Deploying is done copy the Domain name it should display the respective static Reat Website to Endpoints.
Url: https://dq28bbjfgigvm.cloudfront.net/
Flow Structure:
Top comments (0)