当试图在 S3 上创建一个新的 WebSiteBucket 时,我得到了这个(理解的)错误。当然,我没有水桶。我正在尝试创建一个新的。
错误:“指定的存储桶不存在”
代码:
using (AmazonS3 client = AWSClientFactory.CreateAmazonS3Client(
System.Configuration.ConfigurationManager.AppSettings["AWSAccessKey"],
System.Configuration.ConfigurationManager.AppSettings["AWSSecretKey"],
S3Config))
{
WebsiteConfiguration wSite = new WebsiteConfiguration();
wSite.IndexDocumentSuffix = "Index.HTML";
wSite.ErrorDocument = "Error.HTML";
PutBucketWebsiteRequest request = new PutBucketWebsiteRequest();
request.BucketName = bucket_name;
request.WebsiteConfiguration = wSite;
PutBucketWebsiteResponse response = client.PutBucketWebsite(request);
}
请帮忙。谢谢