2011-08-09 228 views
0

当我为s3运行亚马逊web服务的脚本时。它给了我这些错误。我在这里丢失了什么,但是我使用Access和sKey Id亚马逊网络服务问题

Warning: S3::putBucket(yourbucket): [BucketAlreadyExists] The requested bucket name is not available. The bucket namespace is shared by all users of the system. Please select a different name and try again. in /home/programm/public_html/consumers/aws/sources/S3.php on line 188 

Warning: S3::putObject(): [AccessDenied] Access Denied in /home/programm/public_html/consumers/aws/sources/S3.php on line 312 Something went wrong while uploading your file... sorry. 

我需要你的建议。

回答

5

很清楚,还是?指定另一个桶名称...

[BucketAlreadyExists] The requested bucket name is not available 

所以你不能上传到这个桶,因为这个名字水桶在同一区域内已经存在(命名空间是账户之间全球),这是不是你的,然后你会得到这个错误:

[AccessDenied] 
+0

如何创建新的桶和用在这里。 – user264341

+0

@user哪种语言等...... – Skomski

+0

我在这里使用PHP – user264341

0

请参阅Amazon S3 Bucket name restrictions

DNS-compliant bucket names allow customers to benefit from new features and operational improvements, as well as providing support for virtual-host style access to buckets. While the US Standard region currently allows non-compliant DNS bucket naming, we are moving to the same DNS-compliant bucket naming convention for the US Standard region in the coming months. This will ensure a single, consistent naming approach for Amazon S3 buckets. The rules for DNS-compliant bucket names are:

  1. Bucket names must be at least 3 and no more than 63 characters long.

  2. Bucket names must be a series of one or more labels. Adjacent labels are separated by a single period (.). Bucket names can contain lowercase letters, numbers, and hyphens. Each label must start and end with a lowercase letter or a number.

  3. Bucket names must not be formatted as an IP address (e.g., 192.168.5.4).

The following examples are valid bucket names:

myawsbucket

my.aws.bucket

myawsbucket.1

The following examples are invalid bucket names:

Invalid Bucket Name Comment 
.myawsbucket Bucket name cannot start with a period (.). 
myawsbucket. Bucket name cannot end with a period (.). 
my..examplebucket There can be only one period between labels. 
+0

欢迎来到Stack Overflow!虽然这可能在理论上回答这个问题,[这将是更可取的](http://meta.stackexchange.com/q/8259)在这里包括答案的重要部分,并提供供参考的链接。 – user13500

2

S3桶名称必须是全球唯一的。您收到的消息意味着有人正在使用此存储桶名称,因此您不能再使用它。

进一步详情,请参阅AWS documentation

Amazon S3 bucket names are globally unique, regardless of the AWS Region in which you create the bucket. You specify the name at the time you create the bucket.