开发者

Amazon S3: BucketAlreadyExists and AccessDenied errors

When I run given script for amazon web services for s3. It gives me these errors. What I am missing here however I used Access and 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.

I need your suggestions.


Pretty clear, or? Specify another bucket name...

[BucketAlreadyExists] The requested bucket name is not available

So you cant upload to this bucket because a bucket with this name already exists in the same region (the namespace is global between accounts), and it's not yours and then you get this error:

[AccessDenied]


S3 Bucket names have to be globally unique. The message you received means that somebody else is using this bucket name already and due to this you can no longer use it.

See AWS documentation for further details:

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.


If you have access to your Amazon S3 account, you can go to https://console.aws.amazon.com/console/home?# and create a bucket from there.


Please refer to the 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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜