Deploy React App on AWS S3 || How to deploy static files on AWS s3
In this video, we will see how to deploy our react application to AWS s3 by following these steps. 1. Build Your React App: npm run build 2. Create an S3 Bucket: • Leave the other settings as default or configure them according to your needs. • Click through the steps and create the bucket. 3. Configure the Bucket for Website Hosting: • Go to the "Properties" tab. • Click on "Static website hosting". • Choose the option to enable website hosting. • Enter the names of the index document (e.g., index.html) and the error document (e.g., error.html). 4. Set Permissions: • While still in the bucket's properties, go to the "Permissions" tab. • Make your bucket public. • Add a bucket policy that allows public access to your objects. { "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::your-bucket-name/*" } ] } 5. Upload Your Web Content: • From React app's build folder upload all the files from the build folder to the S3 bucket. 6. Access Your React App: • Once the files are uploaded and permissions are set, you can access your React app by visiting the S3 website endpoint, which should be in the format: http://your-bucket-name.s3-website-your-region.amazonaws.com. or • Or go to the properties tab in your bucket and scroll down the page you will see your endpoint. #aws #s3 #react #webdevelopment #nodejs #website
Download
0 formatsNo download links available.