creating s3 bucket with zend

creating s3 bucket with zend  using -'amazon-web-services,zend-framework,amazon-s3'

So I am trying to upload some images to s3 but nothing seems to be working so I thought i'd try something simple -- creating a bucket.

I have this code in my controller's action:

require_once ('Zend/Service/Amazon/S3.php');
$secret   = "SecretKey";
$access  = "AccessKey"

$s3 = new Zend_Service_Amazon_S3($access, $secret);

But when I load this action and check s3 there is no bucket named test!
I am using phpstorm and the IDE says path 'Zend' not found but at the same time it says that it knows what 'new Zend_Service_Amazon_S3' is.

I'm using Zend 2.6

asked Oct 19, 2015 by deven.bendale
0 votes

1 Answer

0 votes

Bucket names in s3 must be globally unique (meaning only 1 user can create a bucket named "test"). It's most likely that somebody has already created the "test" bucket.

I suggest prefixing your bucket names with some identifier that you can expect to have a reasonable likelihood of uniqueness.

An example might be:


References: (See section 3)
Why are S3 and Google Storage bucket names a global namespace?

answered Oct 19, 2015 by gauravsinghal83