2011-08-09 219 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.