Can someone answer my these two questions plz
Do I need to create seprate s3 buckets like one for react app and other for Images and files ?
When I deploy my app like this:
new s3Deployment.BucketDeployment(this, "deployStaticWebsite", { sources: [s3Deployment.Source.asset("../frontEnd/build")], destinationBucket: myBucket, distribution: distribution, // destinationKeyPrefix:"build", });
It replaces all the content of the bucket on every deploy. what is the best solution to avoid this.
CodePudding user response:
Yes you should have a separate bucket for website deployment and data storage. The bucket you use for website will usually be a public one (unless you are using it with cloudfront).