如何管理文件和应用程序的 s3 存储桶?
How to manage s3 bucket for files and app?
谁能回答我这两个问题
我是否需要创建单独的 s3 存储桶,例如一个用于 React 应用程序,另一个用于图像和文件?
当我像这样部署我的应用程序时:
new s3Deployment.BucketDeployment(this, "deployStaticWebsite", {
sources: [s3Deployment.Source.asset("../frontEnd/build")],
destinationBucket: myBucket,
distribution: distribution,
// destinationKeyPrefix:"build",
});
它会在每次部署时替换存储桶中的所有内容。
避免这种情况的最佳解决方案是什么。
是的,您应该有一个单独的存储桶用于网站部署和数据存储。您用于网站的存储桶通常是 public 个(除非您将其与 cloudfront 一起使用)。
谁能回答我这两个问题
我是否需要创建单独的 s3 存储桶,例如一个用于 React 应用程序,另一个用于图像和文件?
当我像这样部署我的应用程序时:
new s3Deployment.BucketDeployment(this, "deployStaticWebsite", { sources: [s3Deployment.Source.asset("../frontEnd/build")], destinationBucket: myBucket, distribution: distribution, // destinationKeyPrefix:"build", });
它会在每次部署时替换存储桶中的所有内容。 避免这种情况的最佳解决方案是什么。
是的,您应该有一个单独的存储桶用于网站部署和数据存储。您用于网站的存储桶通常是 public 个(除非您将其与 cloudfront 一起使用)。