I'm trying to deploy 2 instances (front and back end) separately. Currently, the back end which is the REST API using SpringBoot was successfully deployed in BeanStalk as a.jar file. Now, I have never deploy a front end app (in my case my React app) separately in AWS BeanStalk and I have been doing my research but I'm stuck. How do I "compile" my React app and deploy it in BeanStalk like I did with the back end?
I got it, for anyone in the future needs help with this, all you have to do just follow these steps:
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::(name-of-your-bucket)/*"
}
]
}
"deploy": "aws s3 cp --recursive./build s3://(your-bucket-name)",
execute npm run build in terminal
execute aws s3 cp --recursive./build s3://(your-bucket-name) in terminal
(you are uploading your build files inside the build folder to s3)
go to properties -> static web hosting -> point out the index.html if you use that -> click the end point
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.